pub struct ScopeSet { /* private fields */ }Expand description
What one connection observes of the shared view.
Canonicalized on construction (sorted, deduplicated) so that equality is set equality. The shard compares the freshly asked-for observation against the committed one to decide whether a connection needs the slow path, and a flavor that returns the same set in a different order must not be mistaken for one that moved.
Implementations§
Source§impl ScopeSet
impl ScopeSet
Sourcepub const NONE: ScopeSet
pub const NONE: ScopeSet
Observes nothing at all. This is the state a connection is attached in, which is what makes attaching an ordinary scope change (guide 9.6).
Sourcepub fn new(scopes: &[Scope]) -> Result<ScopeSet, TooManyScopes>
pub fn new(scopes: &[Scope]) -> Result<ScopeSet, TooManyScopes>
Build an observation from a slice of scopes.
§Errors
TooManyScopes when more than MAX_OBSERVED distinct scopes are
given. Duplicates are free.
Trait Implementations§
impl Copy for ScopeSet
impl Eq for ScopeSet
impl StructuralPartialEq for ScopeSet
Auto Trait Implementations§
impl Freeze for ScopeSet
impl RefUnwindSafe for ScopeSet
impl Send for ScopeSet
impl Sync for ScopeSet
impl Unpin for ScopeSet
impl UnwindSafe for ScopeSet
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