pub struct EntityMetadataIndex(/* private fields */);Expand description
A valid entity metadata index in the inclusive range 0..=254.
Byte value 0xff cannot be constructed because it terminates the complete
EntityMetadata sequence.
Implementations§
Source§impl EntityMetadataIndex
impl EntityMetadataIndex
Sourcepub const TERMINATOR: u8 = 0xff
pub const TERMINATOR: u8 = 0xff
Reserved byte that terminates an entity metadata sequence.
Sourcepub const fn new(index: u8) -> Result<Self, InvalidEntityMetadataIndex>
pub const fn new(index: u8) -> Result<Self, InvalidEntityMetadataIndex>
Creates a valid metadata index.
Trait Implementations§
Source§impl Clone for EntityMetadataIndex
impl Clone for EntityMetadataIndex
Source§fn clone(&self) -> EntityMetadataIndex
fn clone(&self) -> EntityMetadataIndex
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 moreimpl Copy for EntityMetadataIndex
Source§impl Debug for EntityMetadataIndex
impl Debug for EntityMetadataIndex
impl Eq for EntityMetadataIndex
Source§impl From<EntityMetadataIndex> for u8
impl From<EntityMetadataIndex> for u8
Source§fn from(value: EntityMetadataIndex) -> Self
fn from(value: EntityMetadataIndex) -> Self
Converts to this type from the input type.
Source§impl Hash for EntityMetadataIndex
impl Hash for EntityMetadataIndex
Source§impl Ord for EntityMetadataIndex
impl Ord for EntityMetadataIndex
Source§fn cmp(&self, other: &EntityMetadataIndex) -> Ordering
fn cmp(&self, other: &EntityMetadataIndex) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EntityMetadataIndex
impl PartialEq for EntityMetadataIndex
Source§impl PartialOrd for EntityMetadataIndex
impl PartialOrd for EntityMetadataIndex
impl StructuralPartialEq for EntityMetadataIndex
Source§impl TryFrom<u8> for EntityMetadataIndex
impl TryFrom<u8> for EntityMetadataIndex
Auto Trait Implementations§
impl Freeze for EntityMetadataIndex
impl RefUnwindSafe for EntityMetadataIndex
impl Send for EntityMetadataIndex
impl Sync for EntityMetadataIndex
impl Unpin for EntityMetadataIndex
impl UnsafeUnpin for EntityMetadataIndex
impl UnwindSafe for EntityMetadataIndex
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.