pub trait Pass<T>: Sized { }Expand description
An argument of type T for a function written in Lean: the value itself, which moves
into Lean, or a reference to it. A reference to a value that Lean converts, such as a
String, is copied. A reference to a value that Lean holds as it is, of an opaque or a
foreign type or a collection of import Inlean, is lent for the call: Lean reads the
caller’s value, and clones it only where it needs one of its own.
A value may also come in what holds it: a Box, a reference to a Box, an Rc or an
Arc, or a Cow. A String also takes a &str, and a Vec<T> a slice or an array of
T.
let name = String::from("ada");
shout(&name); // copied: a `String` is converted
shout("ada"); // copied
shout(name); // moved: Lean's string is this bufferDyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".