Trait bevy_asset::processor::ErasedProcessor
source · pub trait ErasedProcessor: Send + Sync {
// Required methods
fn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
meta: Box<dyn AssetMetaDyn>,
writer: &'a mut Writer
) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>;
fn deserialize_meta(
&self,
meta: &[u8]
) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>;
fn default_meta(&self) -> 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<'_>,
meta: Box<dyn AssetMetaDyn>,
writer: &'a mut Writer
) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>
fn process<'a>( &'a self, context: &'a mut ProcessContext<'_>, meta: Box<dyn AssetMetaDyn>, writer: &'a mut Writer ) -> BoxedFuture<'a, Result<Box<dyn AssetMetaDyn>, ProcessError>>
Type-erased variant of Process::process
.