pub struct EntityMetadataEntry { /* private fields */ }Expand description
One index and one type-safe value in an entity metadata sequence.
Implementations§
Source§impl EntityMetadataEntry
impl EntityMetadataEntry
Sourcepub const fn new(index: EntityMetadataIndex, value: EntityMetadataValue) -> Self
pub const fn new(index: EntityMetadataIndex, value: EntityMetadataValue) -> Self
Creates an entry from an already validated index.
Sourcepub fn try_new(
index: u8,
value: EntityMetadataValue,
) -> Result<Self, InvalidEntityMetadataIndex>
pub fn try_new( index: u8, value: EntityMetadataValue, ) -> Result<Self, InvalidEntityMetadataIndex>
Creates an entry from a raw index, rejecting the 0xff terminator.
Sourcepub const fn index(&self) -> EntityMetadataIndex
pub const fn index(&self) -> EntityMetadataIndex
Returns this entry’s unique index key.
Sourcepub const fn value(&self) -> &EntityMetadataValue
pub const fn value(&self) -> &EntityMetadataValue
Returns this entry’s typed value.
Sourcepub fn into_value(self) -> EntityMetadataValue
pub fn into_value(self) -> EntityMetadataValue
Extracts the typed value.
Trait Implementations§
Source§impl Clone for EntityMetadataEntry
impl Clone for EntityMetadataEntry
Source§fn clone(&self) -> EntityMetadataEntry
fn clone(&self) -> EntityMetadataEntry
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 EntityMetadataEntry
impl Debug for EntityMetadataEntry
Source§impl PartialEq for EntityMetadataEntry
impl PartialEq for EntityMetadataEntry
impl StructuralPartialEq for EntityMetadataEntry
Auto Trait Implementations§
impl Freeze for EntityMetadataEntry
impl RefUnwindSafe for EntityMetadataEntry
impl Send for EntityMetadataEntry
impl Sync for EntityMetadataEntry
impl Unpin for EntityMetadataEntry
impl UnsafeUnpin for EntityMetadataEntry
impl UnwindSafe for EntityMetadataEntry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ContextualCodec for Twhere
T: TypeCodec,
impl<T> ContextualCodec for Twhere
T: TypeCodec,
Source§fn encode_with_context(
&self,
writer: &mut impl Write,
_context: &Context,
) -> Result<(), CodecError>
fn encode_with_context( &self, writer: &mut impl Write, _context: &Context, ) -> Result<(), CodecError>
Encodes this value using context supplied by its enclosing structure.
Source§fn decode_with_context(
reader: &mut impl Read,
_context: &Context,
) -> Result<T, CodecError>where
T: Sized,
fn decode_with_context(
reader: &mut impl Read,
_context: &Context,
) -> Result<T, CodecError>where
T: Sized,
Decodes this value using context supplied by its enclosing structure.