Skip to main content

Boxed

Trait Boxed 

Source
pub trait Boxed<'a> {
    // Required method
    fn boxed(&self) -> Box<dyn Manifest<'a>>;
}
Expand description

Trait, that returns boxed Manifest.

This trait is required for manifests and usually by integrations. It is automatically implemented by derive macro.

impl Boxed<'static> for MyViteManifest {
    fn boxed(&self) -> Box<dyn Manifest<'static>> {
        Box::new(MyViteManifest)
    }
}

SomeCoolAndAwesomeIntegration::new(MyViteManifest.boxed()) // easy and simple!

Required Methods§

Source

fn boxed(&self) -> Box<dyn Manifest<'a>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§