pub struct StoredTransaction {
pub identity: TransactionIdentity,
pub state: TransactionState,
pub chat_id: Option<InlineId>,
pub message_id: Option<InlineId>,
pub failure: Option<ClientFailure>,
pub created_at: i64,
pub updated_at: i64,
}Expand description
Stored durable transaction state.
Fields§
§identity: TransactionIdentityMutation identity and reconciliation IDs.
state: TransactionStateCurrent transaction state.
chat_id: Option<InlineId>Chat containing the transaction, when known.
message_id: Option<InlineId>Final message ID, when known.
failure: Option<ClientFailure>Redacted failure for failed transactions.
created_at: i64Unix timestamp in seconds when the transaction row was created.
updated_at: i64Unix timestamp in seconds when the transaction row was last updated.
Implementations§
Source§impl StoredTransaction
impl StoredTransaction
Sourcepub fn new(identity: TransactionIdentity, state: TransactionState) -> Self
pub fn new(identity: TransactionIdentity, state: TransactionState) -> Self
Creates a stored transaction in the provided state.
Sourcepub fn with_chat_id(self, chat_id: InlineId) -> Self
pub fn with_chat_id(self, chat_id: InlineId) -> Self
Sets the chat ID.
Sourcepub fn with_message_id(self, message_id: InlineId) -> Self
pub fn with_message_id(self, message_id: InlineId) -> Self
Sets the final message ID.
Sourcepub fn with_failure(self, failure: ClientFailure) -> Self
pub fn with_failure(self, failure: ClientFailure) -> Self
Sets the redacted failure.
Sourcepub fn event(&self) -> TransactionEvent
pub fn event(&self) -> TransactionEvent
Converts to a client event payload.
Trait Implementations§
Source§impl Clone for StoredTransaction
impl Clone for StoredTransaction
Source§fn clone(&self) -> StoredTransaction
fn clone(&self) -> StoredTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StoredTransaction
impl Debug for StoredTransaction
impl Eq for StoredTransaction
Source§impl PartialEq for StoredTransaction
impl PartialEq for StoredTransaction
Source§fn eq(&self, other: &StoredTransaction) -> bool
fn eq(&self, other: &StoredTransaction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StoredTransaction
Auto Trait Implementations§
impl Freeze for StoredTransaction
impl RefUnwindSafe for StoredTransaction
impl Send for StoredTransaction
impl Sync for StoredTransaction
impl Unpin for StoredTransaction
impl UnsafeUnpin for StoredTransaction
impl UnwindSafe for StoredTransaction
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