Trait Resources

Source
pub trait Resources: Sized {
    type RegisterError: Into<ResourcesError>;

    // Required method
    fn register_resources(
        comp: &RegisterResources,
    ) -> Result<Self, Self::RegisterError>;
}
Expand description

Resources for a component

Required Associated Types§

Source

type RegisterError: Into<ResourcesError>

The type of error to return if a resource registration failed

This must be convertable into a ResourcesError.

Required Methods§

Source

fn register_resources( comp: &RegisterResources, ) -> Result<Self, Self::RegisterError>

Register resources against a component

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§