Trait Config

Source
pub trait Config: Sized {
    // Required methods
    fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
    fn record_inspect(&self, inspector_node: &Node);

    // Provided methods
    fn take_from_startup_handle() -> Self { ... }
    fn from_vmo(vmo: &Vmo) -> Result<Self, Error> { ... }
}

Required Methods§

Source

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Parse Self from bytes.

Source

fn record_inspect(&self, inspector_node: &Node)

Record config into inspect node.

Provided Methods§

Source

fn take_from_startup_handle() -> Self

Take the config startup handle and parse its contents.

§Panics

If the config startup handle was already taken or if it is not valid.

Source

fn from_vmo(vmo: &Vmo) -> Result<Self, Error>

Parse Self from vmo.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§