pub trait MetadataKind: Clone + Debug {
type MetadataType: Sized;
// Required methods
fn new(metadata: Self::MetadataType) -> Self;
fn materialize(path: &Utf8Path) -> Result<Self, MetadataMaterializeError>;
}
Expand description
Type parameter for MetadataWithRemap
.
Required Associated Types§
Sourcetype MetadataType: Sized
type MetadataType: Sized
The type of metadata stored.
Required Methods§
Sourcefn new(metadata: Self::MetadataType) -> Self
fn new(metadata: Self::MetadataType) -> Self
Constructs a new MetadataKind
from the given metadata.
Sourcefn materialize(path: &Utf8Path) -> Result<Self, MetadataMaterializeError>
fn materialize(path: &Utf8Path) -> Result<Self, MetadataMaterializeError>
Reads a path, resolving it into this data type.
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.