pub trait Transaction<'a, T>{
// Required methods
fn get_transaction_type(&self) -> &TransactionType;
fn get_common_fields(&self) -> &CommonFields<'_, T>;
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, T>;
// Provided methods
fn has_flag(&self, flag: &T) -> bool { ... }
fn get_field_value(&self, field: &str) -> XRPLModelResult<Option<String>> { ... }
fn is_signed(&self) -> bool { ... }
fn get_hash(&self) -> XRPLModelResult<Cow<'_, str>>
where Self: Serialize + DeserializeOwned + Debug + Clone { ... }
}
Expand description
Standard functions for transactions.
Required Methods§
fn get_transaction_type(&self) -> &TransactionType
fn get_common_fields(&self) -> &CommonFields<'_, T>
fn get_mut_common_fields(&mut self) -> &mut CommonFields<'a, T>
Provided Methods§
fn has_flag(&self, flag: &T) -> bool
fn get_field_value(&self, field: &str) -> XRPLModelResult<Option<String>>
fn is_signed(&self) -> bool
Sourcefn get_hash(&self) -> XRPLModelResult<Cow<'_, str>>
fn get_hash(&self) -> XRPLModelResult<Cow<'_, str>>
Hashes the Transaction object as the ledger does. Only valid for signed Transaction objects.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.