[][src]Struct internet2::presentation::BigSize

pub struct BigSize(_);

Lightning TLV uses a custom variable-length integer called BigSize. It is similar to Bitcoin's variable-length integers except that it is serialized in big-endian instead of little-endian.

BigSize specification is given at https://github.com/lightningnetwork/lightning-rfc/blob/master/01-messaging.md#type-length-value-format

Like Bitcoin's variable-length integer, it exhibits ambiguity in that certain values can be encoded in several different ways, which we must check for at deserialization-time. Thus, if you're looking for an example of a variable-length integer to use for your own project, move along, this is a rather poor design.

Trait Implementations

impl Add<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<BigSize> for BigSize[src]

impl AsMut<<BigSize as Wrapper>::Inner> for BigSize[src]

impl AsRef<<BigSize as Wrapper>::Inner> for BigSize[src]

impl BitAnd<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the & operator.

impl BitOr<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the | operator.

impl BitXor<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the ^ operator.

impl Borrow<<BigSize as Wrapper>::Inner> for BigSize[src]

impl BorrowMut<<BigSize as Wrapper>::Inner> for BigSize[src]

impl Clone for BigSize[src]

impl Copy for BigSize[src]

impl Debug for BigSize[src]

impl Deref for BigSize[src]

type Target = Self::Inner

The resulting type after dereferencing.

impl DerefMut for BigSize[src]

impl Display for BigSize[src]

impl Div<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<BigSize> for BigSize[src]

impl Eq for BigSize[src]

impl From<u16> for BigSize[src]

impl From<u32> for BigSize[src]

impl From<u64> for BigSize[src]

impl From<u8> for BigSize[src]

impl From<usize> for BigSize[src]

impl FromStr for BigSize[src]

type Err = <Self::Inner as FromStr>::Err

The associated error which can be returned from parsing.

impl Hash for BigSize[src]

impl LightningDecode for BigSize[src]

impl LightningEncode for BigSize[src]

impl LowerHex for BigSize[src]

impl Mul<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<BigSize> for BigSize[src]

impl Not for BigSize[src]

type Output = Self

The resulting type after applying the ! operator.

impl Octal for BigSize[src]

impl Ord for BigSize[src]

impl PartialEq<BigSize> for BigSize[src]

impl PartialOrd<BigSize> for BigSize[src]

impl Rem<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the % operator.

impl Shl<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the << operator.

impl Shr<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the >> operator.

impl StructuralEq for BigSize[src]

impl StructuralPartialEq for BigSize[src]

impl Sub<BigSize> for BigSize[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<BigSize> for BigSize[src]

impl UpperHex for BigSize[src]

impl Wrapper for BigSize[src]

type Inner = u64

Inner type wrapped by the current newtype

Auto Trait Implementations

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> From<T> for T[src]

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

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToHex for T where
    T: LowerHex

pub fn to_hex(&self) -> String

Outputs the hash in hexadecimal form

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, 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>,