Skip to main content

Loader

Trait Loader 

Source
pub trait Loader<T>
where Self: Sized,
{ // Required methods fn fetch(entry: &Entry) -> Result<Self>; fn value(self) -> T; fn value_ref(&self) -> &T; }
Expand description

A trait to load an object from the program entry.

Required Methods§

Source

fn fetch(entry: &Entry) -> Result<Self>

Fetch an object from the program entry.

Source

fn value(self) -> T

Move the sealed object out.

Source

fn value_ref(&self) -> &T

Returns the refernece of the sealed object.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§