Struct b3_users::data::transaction::UserTransactionData
source · 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 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 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<UserTransactionData> for UserTransactionData
impl PartialEq<UserTransactionData> for UserTransactionData
source§fn eq(&self, other: &UserTransactionData) -> bool
fn eq(&self, other: &UserTransactionData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.