pub struct NullSerializationBackend;Expand description
A null implementation of AssetSerializationBackend that always returns errors.
This backend is useful as a placeholder or for testing error conditions. All operations will fail with an “Unimplemented” error.
Trait Implementations§
Source§impl AssetSerializationBackend for NullSerializationBackend
impl AssetSerializationBackend for NullSerializationBackend
Source§fn serialize(&self, _asset: &SerializedAsset) -> Result<Vec<u8>>
fn serialize(&self, _asset: &SerializedAsset) -> Result<Vec<u8>>
Always returns an error - this backend does not implement serialization.
Source§fn deserialize(&self, _bytes: &[u8]) -> Result<SerializedAsset>
fn deserialize(&self, _bytes: &[u8]) -> Result<SerializedAsset>
Always returns an error - this backend does not implement deserialization.
Auto Trait Implementations§
impl Freeze for NullSerializationBackend
impl RefUnwindSafe for NullSerializationBackend
impl Send for NullSerializationBackend
impl Sync for NullSerializationBackend
impl Unpin for NullSerializationBackend
impl UnsafeUnpin for NullSerializationBackend
impl UnwindSafe for NullSerializationBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.