pub struct UserTransactionData {
pub data: Vec<u8>,
pub cycle: u64,
pub timestamp: u64,
}Fields§
§data: Vec<u8>§cycle: u64§timestamp: u64Implementations§
Source§impl UserTransactionData
impl UserTransactionData
Sourcepub fn default() -> Self
pub fn default() -> Self
Creates a default TransactionData with empty data and a timestamp of 0.
Sourcepub fn new(data: Vec<u8>, cycle: u64, timestamp: u64) -> Self
pub fn new(data: Vec<u8>, cycle: u64, timestamp: u64) -> Self
Creates a new TransactionData with the given data and timestamp.
Sourcepub fn new_with_current_time(data: Vec<u8>, cycle: u64) -> Self
pub fn new_with_current_time(data: Vec<u8>, cycle: u64) -> Self
Creates a new TransactionData with the given data and the current timestamp.
Trait Implementations§
Source§impl CandidType for UserTransactionData
impl CandidType for UserTransactionData
Source§impl Clone for UserTransactionData
impl Clone for UserTransactionData
Source§fn clone(&self) -> UserTransactionData
fn clone(&self) -> UserTransactionData
Returns a duplicate 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 UserTransactionData
impl Debug for UserTransactionData
Source§impl<'de> Deserialize<'de> for UserTransactionData
impl<'de> Deserialize<'de> for UserTransactionData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for UserTransactionData
impl PartialEq for UserTransactionData
impl StructuralPartialEq for UserTransactionData
Auto Trait Implementations§
impl Freeze for UserTransactionData
impl RefUnwindSafe for UserTransactionData
impl Send for UserTransactionData
impl Sync for UserTransactionData
impl Unpin for UserTransactionData
impl UnwindSafe for UserTransactionData
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