pub struct SerializableMaterialData {
pub type_name: String,
pub data: Vec<u8>,
}Expand description
A serializable wrapper for a material that stores the type name and binary data.
Fields§
§type_name: StringIdentifier used to look up the matching MaterialRegistration on decode.
data: Vec<u8>Opaque payload produced by the registration’s serialize function.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for SerializableMaterialData
impl<'__de, __Context> BorrowDecode<'__de, __Context> for SerializableMaterialData
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for SerializableMaterialData
impl Clone for SerializableMaterialData
Source§fn clone(&self) -> SerializableMaterialData
fn clone(&self) -> SerializableMaterialData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializableMaterialData
impl Debug for SerializableMaterialData
Source§impl<__Context> Decode<__Context> for SerializableMaterialData
impl<__Context> Decode<__Context> for SerializableMaterialData
Auto Trait Implementations§
impl Freeze for SerializableMaterialData
impl RefUnwindSafe for SerializableMaterialData
impl Send for SerializableMaterialData
impl Sync for SerializableMaterialData
impl Unpin for SerializableMaterialData
impl UnsafeUnpin for SerializableMaterialData
impl UnwindSafe for SerializableMaterialData
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