pub struct StockNoteStateOwner { /* private fields */ }Implementations§
Source§impl StockNoteStateOwner
impl StockNoteStateOwner
pub fn identity_matches(&self, identity: StockNoteIdentity) -> bool
pub fn memory_only() -> Self
pub fn with_store(store: StockNoteStore) -> Self
pub fn install_store(&self, store: StockNoteStore)
pub fn bind_identity( &self, identity: StockNoteIdentity, ) -> Result<BindResult, StockNoteStateError>
pub fn apply_loaded_disk( &self, identity: StockNoteIdentity, revision: u64, basics: Vec<ProjectedNoteBasic>, ) -> CommitStatus
pub fn begin_full_pull( &self, identity: StockNoteIdentity, ) -> Result<FullPullToken, StockNoteStateError>
pub fn complete_full_pull( &self, token: FullPullToken, basics: Vec<ProjectedNoteBasic>, ) -> CommitResult
pub fn abort_full_pull(&self, token: FullPullToken)
pub fn take_repull_requested(&self) -> bool
pub fn apply_push( &self, identity: StockNoteIdentity, operation: NoteOperation, basic: Option<ProjectedNoteBasic>, ) -> Result<CommitResult, StockNoteStateError>
pub fn project_ids(&self, stock_ids: &[u64]) -> Vec<ProjectedNoteBasic>
pub async fn acquire_mutation_lease( &self, identity: StockNoteIdentity, stock_id: u64, ) -> Result<OwnedMutexGuard<()>, StockNoteStateError>
pub fn begin_mutation( &self, identity: StockNoteIdentity, operation: NoteOperation, expected: ProjectedNoteBasic, ) -> Result<MutationRegistration, StockNoteStateError>
pub fn finish_mutation(&self, token: MutationToken)
pub fn apply_reconcile( &self, token: MutationToken, basic: Option<ProjectedNoteBasic>, ) -> CommitResult
pub fn snapshot(&self) -> StockNoteSnapshot
Trait Implementations§
Source§impl Clone for StockNoteStateOwner
impl Clone for StockNoteStateOwner
Source§fn clone(&self) -> StockNoteStateOwner
fn clone(&self) -> StockNoteStateOwner
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for StockNoteStateOwner
impl !UnwindSafe for StockNoteStateOwner
impl Freeze for StockNoteStateOwner
impl Send for StockNoteStateOwner
impl Sync for StockNoteStateOwner
impl Unpin for StockNoteStateOwner
impl UnsafeUnpin for StockNoteStateOwner
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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