Struct bonsaidb::core::ordered_varint::Unsigned
[−]pub struct Unsigned(_);
Expand description
An unsigned integer value
This type encodes values in the range 0..2.pow(124)
by using the first 4
bits to denote an unsigned byte length
. This length ranges from 0..=15
.
The remaining 4 bits of the first byte and any additional bytes are then
used to store the integer in big-endian encoding.
Trait Implementations
The error type that can be produced by either serialization or deserialization. Read more
Convert self
into a Cow<[u8]>
containing bytes ordered in big-endian/network byte order.
impl PartialOrd<Unsigned> for Unsigned
impl PartialOrd<Unsigned> for Unsigned
pub fn partial_cmp(&self, other: &Unsigned) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Unsigned) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Encodes self
into destination
, returning the number of bytes written upon success.
pub fn decode_variable<R>(input: R) -> Result<Unsigned, Error> where
R: Read,
pub fn decode_variable<R>(input: R) -> Result<Unsigned, Error> where
R: Read,
Decodes a variable length value from source
.
impl StructuralEq for Unsigned
impl StructuralPartialEq for Unsigned
Auto Trait Implementations
impl RefUnwindSafe for Unsigned
impl UnwindSafe for Unsigned
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more