#[non_exhaustive]pub enum RegionScope {
All,
Only(Vec<Id>),
}Expand description
Which regions a subscription covers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
All
The frame sent null or left regionIds out. The subscription is
dynamic: every region in which the user has an active avatar,
adjusting as the user enters and leaves regions (§Subscription
Scope).
Only(Vec<Id>)
The frame sent an explicit list, in the order sent. The subscription is static: only these regions, and of them only those with an active avatar of the user at delivery time. An empty list covers no region.
Implementations§
Source§impl RegionScope
impl RegionScope
Sourcepub fn covers(&self, region_id: &Id) -> bool
pub fn covers(&self, region_id: &Id) -> bool
Whether region_id is in scope. Always true for
RegionScope::All; the active-avatar check is separate.
Trait Implementations§
Source§impl Clone for RegionScope
impl Clone for RegionScope
Source§impl Debug for RegionScope
impl Debug for RegionScope
impl Eq for RegionScope
Source§impl PartialEq for RegionScope
impl PartialEq for RegionScope
impl StructuralPartialEq for RegionScope
Auto Trait Implementations§
impl Freeze for RegionScope
impl RefUnwindSafe for RegionScope
impl Send for RegionScope
impl Sync for RegionScope
impl Unpin for RegionScope
impl UnsafeUnpin for RegionScope
impl UnwindSafe for RegionScope
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