pub struct Transaction {
pub id: TransactionId,
/* private fields */
}Fields§
§id: TransactionIdImplementations§
Source§impl Transaction
impl Transaction
pub fn id(&self) -> TransactionId
pub fn journal_id(&self) -> JournalId
pub fn values(&self) -> &TransactionValues
pub fn into_values(self) -> TransactionValues
pub fn created_at(&self) -> DateTime<Utc>
pub fn effective(&self) -> NaiveDate
pub fn modified_at(&self) -> DateTime<Utc>
pub fn metadata<T: DeserializeOwned>(&self) -> Result<Option<T>, Error>
Trait Implementations§
Source§impl EsEntity for Transaction
impl EsEntity for Transaction
type Event = TransactionEvent
type New = NewTransaction
Source§fn events_mut(&mut self) -> &mut EntityEvents<TransactionEvent>
fn events_mut(&mut self) -> &mut EntityEvents<TransactionEvent>
Returns mutable reference to the entity’s events
Source§fn events(&self) -> &EntityEvents<TransactionEvent>
fn events(&self) -> &EntityEvents<TransactionEvent>
Returns an immutable reference to the entity’s events
Source§fn last_persisted(&self, n: usize) -> Iter<'_, PersistedEvent<Self::Event>>
fn last_persisted(&self, n: usize) -> Iter<'_, PersistedEvent<Self::Event>>
Returns the last
n persisted eventsSource§impl From<&Transaction> for TransactionByCreatedAtCursor
impl From<&Transaction> for TransactionByCreatedAtCursor
Source§fn from(entity: &Transaction) -> Self
fn from(entity: &Transaction) -> Self
Converts to this type from the input type.
Source§impl TryFromEvents<TransactionEvent> for Transaction
impl TryFromEvents<TransactionEvent> for Transaction
Source§fn try_from_events(
events: EntityEvents<TransactionEvent>,
) -> Result<Self, EntityHydrationError>
fn try_from_events( events: EntityEvents<TransactionEvent>, ) -> Result<Self, EntityHydrationError>
Method to implement which hydrates
Entity by replaying its events chronologicallyAuto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more