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§
Sourcetype RegisterError: Into<ResourcesError>
type RegisterError: Into<ResourcesError>
The type of error to return if a resource registration failed
This must be convertable into a ResourcesError
.
Required Methods§
Sourcefn register_resources(
comp: &RegisterResources,
) -> Result<Self, Self::RegisterError>
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.