pub struct Short(pub i16);Expand description
A two’s-complement signed 16-bit integer from -32,768 through 32,767.
Tuple Fields§
§0: i16The integer value.
Trait Implementations§
impl Copy for Short
Source§impl EnumRepr for Short
impl EnumRepr for Short
Source§fn from_discriminant(value: i128) -> Option<Self>
fn from_discriminant(value: i128) -> Option<Self>
Converts a Rust enum discriminant into this wire representation.
Source§fn discriminant(&self) -> i128
fn discriminant(&self) -> i128
Returns this representation as a numeric enum discriminant.
impl Eq for Short
impl StructuralPartialEq for Short
Auto Trait Implementations§
impl Freeze for Short
impl RefUnwindSafe for Short
impl Send for Short
impl Sync for Short
impl Unpin for Short
impl UnsafeUnpin for Short
impl UnwindSafe for Short
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.