pub struct BigSize(pub u64);Expand description
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.
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.
Tuple Fields§
§0: u64Trait Implementations§
Source§impl Ord for BigSize
impl Ord for BigSize
Source§impl PartialOrd for BigSize
impl PartialOrd for BigSize
Source§impl Writeable for BigSize
impl Writeable for BigSize
impl Copy for BigSize
impl Eq for BigSize
impl StructuralPartialEq for BigSize
Auto Trait Implementations§
impl Freeze for BigSize
impl RefUnwindSafe for BigSize
impl Send for BigSize
impl Sync for BigSize
impl Unpin for BigSize
impl UnwindSafe for BigSize
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