[−][src]Struct internet2::presentation::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.
pub fn add(self, rhs: Self) -> Self
[src]
impl AddAssign<BigSize> for BigSize
[src]
pub fn add_assign(&mut self, rhs: Self)
[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.
pub fn bitand(self, rhs: Self) -> Self
[src]
impl BitOr<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: Self) -> Self
[src]
impl BitXor<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: Self) -> Self
[src]
impl Borrow<<BigSize as Wrapper>::Inner> for BigSize
[src]
impl BorrowMut<<BigSize as Wrapper>::Inner> for BigSize
[src]
pub fn borrow_mut(&mut self) -> &mut Self::Inner
[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.
pub fn deref(&self) -> &Self::Target
[src]
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.
pub fn div(self, rhs: Self) -> Self
[src]
impl DivAssign<BigSize> for BigSize
[src]
pub fn div_assign(&mut self, rhs: Self)
[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.
pub fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for BigSize
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LightningDecode for BigSize
[src]
pub fn lightning_decode<D: Read>(mut d: D) -> Result<Self, Error>
[src]
pub fn lightning_deserialize(data: &impl AsRef<[u8]>) -> Result<Self, Error>
[src]
impl LightningEncode for BigSize
[src]
pub fn lightning_encode<E: Write>(&self, mut e: E) -> Result<usize, Error>
[src]
pub fn lightning_serialize(&self) -> Vec<u8>
[src]
impl LowerHex for BigSize
[src]
impl Mul<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the *
operator.
pub fn mul(self, rhs: Self) -> Self
[src]
impl MulAssign<BigSize> for BigSize
[src]
pub fn mul_assign(&mut self, rhs: Self)
[src]
impl Not for BigSize
[src]
impl Octal for BigSize
[src]
impl Ord for BigSize
[src]
pub fn cmp(&self, other: &BigSize) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<BigSize> for BigSize
[src]
impl PartialOrd<BigSize> for BigSize
[src]
pub fn partial_cmp(&self, other: &BigSize) -> Option<Ordering>
[src]
pub fn lt(&self, other: &BigSize) -> bool
[src]
pub fn le(&self, other: &BigSize) -> bool
[src]
pub fn gt(&self, other: &BigSize) -> bool
[src]
pub fn ge(&self, other: &BigSize) -> bool
[src]
impl Rem<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the %
operator.
pub fn rem(self, rhs: Self) -> Self
[src]
impl Shl<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the <<
operator.
pub fn shl(self, rhs: Self) -> Self
[src]
impl Shr<BigSize> for BigSize
[src]
type Output = Self
The resulting type after applying the >>
operator.
pub fn shr(self, rhs: Self) -> Self
[src]
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.
pub fn sub(self, rhs: Self) -> Self
[src]
impl SubAssign<BigSize> for BigSize
[src]
pub fn sub_assign(&mut self, rhs: Self)
[src]
impl UpperHex for BigSize
[src]
impl Wrapper for BigSize
[src]
Auto Trait Implementations
impl RefUnwindSafe for BigSize
[src]
impl Send for BigSize
[src]
impl Sync for BigSize
[src]
impl Unpin for BigSize
[src]
impl UnwindSafe for BigSize
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: LowerHex,
T: LowerHex,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,