pub struct Positive<'a>(Input<'a>);
Expand description
A serialized positive integer.
Tuple Fields§
§0: Input<'a>
Implementations§
source§impl<'a> Positive<'a>
impl<'a> Positive<'a>
pub(crate) fn from_be_bytes(input: Input<'a>) -> Result<Self, Unspecified>
sourcepub fn big_endian_without_leading_zero(&self) -> &'a [u8] ⓘ
pub fn big_endian_without_leading_zero(&self) -> &'a [u8] ⓘ
Returns the value, ordered from significant byte to least significant byte, without any leading zeros. The result is guaranteed to be non-empty.
pub(crate) fn big_endian_without_leading_zero_as_input(&self) -> Input<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Positive<'a>
impl<'a> RefUnwindSafe for Positive<'a>
impl<'a> Send for Positive<'a>
impl<'a> Sync for Positive<'a>
impl<'a> Unpin for Positive<'a>
impl<'a> UnwindSafe for Positive<'a>
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