Skip to main content

from

Macro from 

Source
macro_rules! from {
    ($owner:expr, $dependant:ident, $target:ty) => { ... };
}
Expand description

Convenience macro for constructing a Zc type via a Dependant’s From.

See Zc::new() for an example.

This macro creates an intermediate function to annotate the lifetime required for the Construct trait as the compiler is not smart enough yet to infer it for us. See issues 22340 and 70263.