Enum jcm::EscrowData
source · #[repr(C)]pub enum EscrowData {
Currency(Currency),
Ticket(Ticket),
}Expand description
Represents the additional data of an [EscrowEvent].
Variants§
Implementations§
source§impl EscrowData
impl EscrowData
sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new EscrowData.
sourcepub const fn new_currency(currency: Currency) -> Self
pub const fn new_currency(currency: Currency) -> Self
Creates a new EscrowData with a Currency variant.
sourcepub const fn new_ticket(ticket: Ticket) -> Self
pub const fn new_ticket(ticket: Ticket) -> Self
Creates a new EscrowData with a Ticket variant.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Gets the length of the EscrowData.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Gets whether the EscrowData is empty.
sourcepub fn to_vec(&self) -> Vec<u8>
pub fn to_vec(&self) -> Vec<u8>
Converts the EscrowData into a byte vector.
Trait Implementations§
source§impl Clone for EscrowData
impl Clone for EscrowData
source§fn clone(&self) -> EscrowData
fn clone(&self) -> EscrowData
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 EscrowData
impl Debug for EscrowData
source§impl Default for EscrowData
impl Default for EscrowData
source§impl PartialEq for EscrowData
impl PartialEq for EscrowData
source§fn eq(&self, other: &EscrowData) -> bool
fn eq(&self, other: &EscrowData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&[u8]> for EscrowData
impl TryFrom<&[u8]> for EscrowData
impl StructuralPartialEq for EscrowData
Auto Trait Implementations§
impl Freeze for EscrowData
impl RefUnwindSafe for EscrowData
impl Send for EscrowData
impl Sync for EscrowData
impl Unpin for EscrowData
impl UnwindSafe for EscrowData
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