Struct lightning::util::ser::TransactionU16LenLimited
source · pub struct TransactionU16LenLimited(/* private fields */);
Expand description
A wrapper for a Transaction
which can only be constructed with TransactionU16LenLimited::new
if the Transaction
’s consensus-serialized length is <= u16::MAX.
Use TransactionU16LenLimited::into_transaction
to convert into the contained Transaction
.
Implementations§
source§impl TransactionU16LenLimited
impl TransactionU16LenLimited
sourcepub fn new(transaction: Transaction) -> Result<Self, ()>
pub fn new(transaction: Transaction) -> Result<Self, ()>
Constructs a new TransactionU16LenLimited
from a Transaction
only if it’s consensus-
serialized length is <= u16::MAX.
sourcepub fn into_transaction(self) -> Transaction
pub fn into_transaction(self) -> Transaction
Consumes this TransactionU16LenLimited
and returns its contained Transaction
.
Trait Implementations§
source§impl Clone for TransactionU16LenLimited
impl Clone for TransactionU16LenLimited
source§fn clone(&self) -> TransactionU16LenLimited
fn clone(&self) -> TransactionU16LenLimited
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransactionU16LenLimited
impl Debug for TransactionU16LenLimited
source§impl PartialEq for TransactionU16LenLimited
impl PartialEq for TransactionU16LenLimited
source§fn eq(&self, other: &TransactionU16LenLimited) -> bool
fn eq(&self, other: &TransactionU16LenLimited) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Readable for TransactionU16LenLimited
impl Readable for TransactionU16LenLimited
source§impl Writeable for TransactionU16LenLimited
impl Writeable for TransactionU16LenLimited
impl Eq for TransactionU16LenLimited
impl StructuralEq for TransactionU16LenLimited
impl StructuralPartialEq for TransactionU16LenLimited
Auto Trait Implementations§
impl RefUnwindSafe for TransactionU16LenLimited
impl Send for TransactionU16LenLimited
impl Sync for TransactionU16LenLimited
impl Unpin for TransactionU16LenLimited
impl UnwindSafe for TransactionU16LenLimited
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