pub struct LocalScopeState { /* private fields */ }Expand description
Serializable reference model used by adapters and compliance tests.
Implementations§
Source§impl LocalScopeState
impl LocalScopeState
Sourcepub fn install(&mut self, subscription: Subscription) -> Result<(), ScopeError>
pub fn install(&mut self, subscription: Subscription) -> Result<(), ScopeError>
Installs a newly server-resolved subscription without activating data.
§Errors
Returns an error when either identity is already present.
pub fn subscription(&self, id: SubscriptionId) -> Option<&Subscription>
pub fn active_scopes( &self, projection: ProjectionVersion, entity: EntityRef, ) -> BTreeSet<SyncScopeId>
pub fn pending_disposition( &self, operation: OperationId, ) -> Option<PendingIntentDisposition>
pub fn active_subscription_count(&self) -> usize
pub fn pending_transition_count(&self) -> usize
pub fn membership_reference_count(&self) -> usize
pub fn quarantined_operation_count(&self) -> usize
Sourcepub fn apply(
&mut self,
transition: &ScopeTransition,
) -> Result<ScopeTransitionOutcome, ScopeError>
pub fn apply( &mut self, transition: &ScopeTransition, ) -> Result<ScopeTransitionOutcome, ScopeError>
Applies a transition atomically to a cloned model, swapping only after all checks pass.
§Errors
Returns a typed error without changing state when the transition is invalid or stale.
Trait Implementations§
Source§impl Clone for LocalScopeState
impl Clone for LocalScopeState
Source§fn clone(&self) -> LocalScopeState
fn clone(&self) -> LocalScopeState
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 LocalScopeState
impl Debug for LocalScopeState
Source§impl Default for LocalScopeState
impl Default for LocalScopeState
Source§fn default() -> LocalScopeState
fn default() -> LocalScopeState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LocalScopeState
impl<'de> Deserialize<'de> for LocalScopeState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LocalScopeState
Source§impl PartialEq for LocalScopeState
impl PartialEq for LocalScopeState
Source§impl Serialize for LocalScopeState
impl Serialize for LocalScopeState
impl StructuralPartialEq for LocalScopeState
Auto Trait Implementations§
impl Freeze for LocalScopeState
impl RefUnwindSafe for LocalScopeState
impl Send for LocalScopeState
impl Sync for LocalScopeState
impl Unpin for LocalScopeState
impl UnsafeUnpin for LocalScopeState
impl UnwindSafe for LocalScopeState
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