Struct feeless::Raw[][src]

pub struct Raw(_);

Container for the smallest Nano unit, with conversion functionality, e.g. from raw to Mnano.

It can convert from/into Mnano, nano, hex, String, and BigDecimal for decimal accuracy.

Implementations

impl Raw[src]

pub fn zero() -> Self[src]

pub fn max() -> Self[src]

pub fn from_raw<T: Into<u128>>(v: T) -> Self[src]

pub fn from_nano<T: Into<u128>>(v: T) -> Self[src]

pub fn from_mnano<T: Into<u128>>(v: T) -> Self[src]

pub fn from_raw_str(v: &str) -> Result<Self>[src]

pub fn to_vec(&self) -> Vec<u8>[src]

pub fn to_raw_string(&self) -> String[src]

pub fn to_hex_string(&self) -> String[src]

pub fn to_raw_u128(&self) -> u128[src]

pub fn to_bigdecimal(&self) -> BigDecimal[src]

pub fn to_nano_bigdecimal(&self) -> BigDecimal[src]

pub fn to_mnano_bigdecimal(&self) -> BigDecimal[src]

pub fn to_nano_string(&self) -> String[src]

pub fn to_mnano_string(&self) -> String[src]

pub fn checked_add(&self, rhs: &Self) -> Option<Self>[src]

pub fn checked_sub(&self, rhs: &Self) -> Option<Self>[src]

Trait Implementations

impl Clone for Raw[src]

impl Debug for Raw[src]

impl<'de> Deserialize<'de> for Raw[src]

impl Display for Raw[src]

impl Eq for Raw[src]

impl From<u128> for Raw[src]

impl FromStr for Raw[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<Raw> for Raw[src]

impl PartialEq<u128> for Raw[src]

impl PartialOrd<Raw> for Raw[src]

impl PartialOrd<u128> for Raw[src]

impl Serialize for Raw[src]

This serializer and deserializer are for strings with decimal numbers. See serialize_to_hex and deserialize_from_hex if you expect your strings to be hex.

impl StructuralEq for Raw[src]

impl StructuralPartialEq for Raw[src]

impl TryFrom<&'_ [u8]> for Raw[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Raw

impl Send for Raw

impl Sync for Raw

impl Unpin for Raw

impl UnwindSafe for Raw

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,