pub trait ErasedProcessor: Send + Sync {
// Required methods
fn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
settings: &'a dyn Settings,
writer: &'a mut Writer,
) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>;
fn deserialize_meta(
&self,
meta: &[u8],
) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>;
fn type_path(&self) -> &'static str;
fn short_type_path(&self) -> &'static str;
fn default_meta(
&self,
processor_path_kind: MetaTypePathKind,
) -> Box<dyn AssetMetaDyn>;
}Expand description
A type-erased variant of Process that enables interacting with processor implementations without knowing
their type.
Required Methods§
Sourcefn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
settings: &'a dyn Settings,
writer: &'a mut Writer,
) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>
fn process<'a>( &'a self, context: &'a mut ProcessContext<'_>, settings: &'a dyn Settings, writer: &'a mut Writer, ) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>
Type-erased variant of Process::process.
Sourcefn deserialize_meta(
&self,
meta: &[u8],
) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>
fn deserialize_meta( &self, meta: &[u8], ) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>
Sourcefn short_type_path(&self) -> &'static str
fn short_type_path(&self) -> &'static str
Returns the short type path of this processor.
Sourcefn default_meta(
&self,
processor_path_kind: MetaTypePathKind,
) -> Box<dyn AssetMetaDyn>
fn default_meta( &self, processor_path_kind: MetaTypePathKind, ) -> Box<dyn AssetMetaDyn>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".