pub struct Integer<'a>(/* private fields */);Expand description
An integer, as its two’s complement bytes.
Serial numbers reach twenty bytes and public key moduli are far larger, so this stays as it was encoded and converts on request.
Implementations§
Source§impl<'a> Integer<'a>
impl<'a> Integer<'a>
Sourcepub fn is_negative(self) -> bool
pub fn is_negative(self) -> bool
Whether the value is below zero.
Sourcepub fn as_u64(self) -> Option<u64>
pub fn as_u64(self) -> Option<u64>
The value as an unsigned number, or None when it is negative or wider
than sixty-four bits.
Trait Implementations§
impl<'a> Copy for Integer<'a>
impl<'a> Eq for Integer<'a>
impl<'a> StructuralPartialEq for Integer<'a>
Auto Trait Implementations§
impl<'a> Freeze for Integer<'a>
impl<'a> RefUnwindSafe for Integer<'a>
impl<'a> Send for Integer<'a>
impl<'a> Sync for Integer<'a>
impl<'a> Unpin for Integer<'a>
impl<'a> UnsafeUnpin for Integer<'a>
impl<'a> UnwindSafe for Integer<'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