pub struct ApprovalStore {
pub last_sequence: u64,
/* private fields */
}Expand description
Reference in-memory, replay-safe approval state machine.
Fields§
§last_sequence: u64Implementations§
Source§impl ApprovalStore
impl ApprovalStore
pub fn new() -> Self
pub fn add(&mut self, e: Envelope) -> Result<()>
pub fn decide( &mut self, e: Envelope, now: DateTime<Utc>, current_action: Option<&Action>, ) -> Result<Envelope>
pub fn snapshot(&self, stream: Option<String>, now: DateTime<Utc>) -> Envelope
pub fn from_snapshot(e: &Envelope) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApprovalStore
impl RefUnwindSafe for ApprovalStore
impl Send for ApprovalStore
impl Sync for ApprovalStore
impl Unpin for ApprovalStore
impl UnsafeUnpin for ApprovalStore
impl UnwindSafe for ApprovalStore
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