Ask coding questions

← Back to all posts
rust, I want to use use predicates::prelude::*;
mec337 (0)

using a basic rust repl creates a basic flat folder structure, how do I use the rust crate:- use predicates::prelude::*;

Can I use dependencies in a flat folder i.e. no src folder etc or if I am forced to use cargo new / build etc from shell, if I am can I modify what happens when I click on the repl "Run" button to launch ?

theangryepicbanana (1697)

You can add a .replit file that does something like:

run = "cargo run"

otherwise cargo is completely useable from a repl afaik

CodeMaster007 (108)


pub use boolean::PredicateBooleanExt;
pub use name::PredicateNameExt;

Predicate Trait for generically evaluating a type against a dynamically created predicate function.
PredicateBoxExt Predicate extension for boxing a Predicate.
PredicateFileContentExt Predicate extension adapting a slice Predicate.
PredicateStrExt Predicate extension adapting a str Predicate.