Integer

Struct Integer 

Source
pub struct Integer(/* private fields */);

Implementations§

Source§

impl Integer

Source

pub fn to_u128(&self) -> Option<u128>

Source

pub fn to_u64(&self) -> Option<u64>

Source

pub fn to_u32(&self) -> Option<u32>

Source

pub fn to_u16(&self) -> Option<u16>

Source

pub fn to_u8(&self) -> Option<u8>

Source§

impl Integer

Source

pub fn from_slice(slice: &[u8]) -> Result<&Self, ()>

Trait Implementations§

Source§

impl AsRef<[u8]> for Integer

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Integer

Source§

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

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

impl Hash for Integer

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for Integer

Source§

fn eq(&self, other: &Integer) -> 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 Eq for Integer

Source§

impl StructuralPartialEq for Integer

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