VarInt64

Struct VarInt64 

Source
pub struct VarInt64(pub u64);
Expand description

A struct representing a variable-length 64-bit integer.

Tuple Fields§

§0: u64

Trait Implementations§

Source§

impl Debug for VarInt64

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VarInt64

Source§

fn default() -> VarInt64

Returns the “default value” for a type. Read more
Source§

impl<'a> Deserialize<'a> for VarInt64

Source§

fn deserialize_from<D: Deserializer<'a>>(buf: &mut D) -> Result<Self>
where Self: Sized,

Deserializes the VarInt64 from the given Deserializer.

§Arguments
  • buf - The Deserializer to deserialize the data from.
§Returns

A Result containing the deserialized VarInt64 or an error.

Source§

fn deserialize<D: Deserializer<'a>>(der: D) -> Result<Self>
where Self: Sized,

Deserializes the data from a Deserializer. Read more
Source§

impl PartialEq for VarInt64

Source§

fn eq(&self, other: &VarInt64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for VarInt64

Source§

fn serialize_to<S: Serializer>(&self, serializer: &mut S) -> Result<()>

Serializes the VarInt64 into the given Serializer.

§Arguments
  • serializer - The Serializer to serialize the data into.
§Returns

A Result indicating success or failure.

Source§

fn serialize<S: Serializer + Default>(&self) -> Result<S>

Serializes the data into a new Serializer instance. Read more
Source§

impl Eq for VarInt64

Source§

impl StructuralPartialEq for VarInt64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.