pub trait ErasedProcessor: Send + Sync {
// Required methods
fn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
settings: &'a (dyn Settings + 'static),
writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static),
) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<Box<dyn AssetMetaDyn>, ProcessError>> + 'a>>;
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 + 'static),
writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static),
) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<Box<dyn AssetMetaDyn>, ProcessError>> + 'a>>
fn process<'a>( &'a self, context: &'a mut ProcessContext<'_>, settings: &'a (dyn Settings + 'static), writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static), ) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<Box<dyn AssetMetaDyn>, ProcessError>> + 'a>>
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".