Trait bevy::asset::processor::ErasedProcessor
pub trait ErasedProcessor: Send + Sync {
// Required methods
fn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
meta: Box<dyn AssetMetaDyn, Global>,
writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static)
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AssetMetaDyn, Global>, ProcessError>> + Send + 'a, Global>>;
fn deserialize_meta(
&self,
meta: &[u8]
) -> Result<Box<dyn AssetMetaDyn, Global>, DeserializeMetaError>;
fn default_meta(&self) -> Box<dyn AssetMetaDyn, Global>;
}
Expand description
A type-erased variant of Process
that enables interacting with processor implementations without knowing
their type.
Required Methods§
fn process<'a>(
&'a self,
context: &'a mut ProcessContext<'_>,
meta: Box<dyn AssetMetaDyn, Global>,
writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static)
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AssetMetaDyn, Global>, ProcessError>> + Send + 'a, Global>>
fn process<'a>( &'a self, context: &'a mut ProcessContext<'_>, meta: Box<dyn AssetMetaDyn, Global>, writer: &'a mut (dyn AsyncWrite + Sync + Unpin + Send + 'static) ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AssetMetaDyn, Global>, ProcessError>> + Send + 'a, Global>>
Type-erased variant of Process::process
.