pub trait Resource: Sized + 'static {
type Rep: ResourceRep<Self>;
}Expand description
A trait implemented by all resources that a component might export.
This is an implementation detail primarily for the code generated by exported resources. The primary purpose of this trait is to serve as an abstraction for the in-memory storage of a resource.
Required Associated Types§
Sourcetype Rep: ResourceRep<Self>
type Rep: ResourceRep<Self>
The type which is actually stored in-memory for this resource.
By default this is Option<T>.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".