pub enum ScopeValue {
Wildcard,
Set(BTreeSet<String>),
Single(String),
}Expand description
One dimension’s value in the scope lattice. The default is
ScopeValue::Wildcard: an unconstrained dimension.
Variants§
Wildcard
Unconstrained — the top of the lattice.
Set(BTreeSet<String>)
One of a finite set of values.
Single(String)
Exactly one value — the bottom of the lattice.
Implementations§
Source§impl ScopeValue
impl ScopeValue
Sourcepub fn narrows_within(&self, parent: &ScopeValue) -> bool
pub fn narrows_within(&self, parent: &ScopeValue) -> bool
Returns true when self is a subset of (or equal to) parent
in the lattice: wildcard encompasses anything; a set encompasses
its subsets and singles; a single encompasses only itself.
Trait Implementations§
Source§impl Clone for ScopeValue
impl Clone for ScopeValue
Source§fn clone(&self) -> ScopeValue
fn clone(&self) -> ScopeValue
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 ScopeValue
impl Debug for ScopeValue
Source§impl Default for ScopeValue
impl Default for ScopeValue
Source§fn default() -> ScopeValue
fn default() -> ScopeValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScopeValue
impl<'de> Deserialize<'de> for ScopeValue
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 ScopeValue
Source§impl PartialEq for ScopeValue
impl PartialEq for ScopeValue
Source§fn eq(&self, other: &ScopeValue) -> bool
fn eq(&self, other: &ScopeValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ScopeValue
impl Serialize for ScopeValue
impl StructuralPartialEq for ScopeValue
Auto Trait Implementations§
impl Freeze for ScopeValue
impl RefUnwindSafe for ScopeValue
impl Send for ScopeValue
impl Sync for ScopeValue
impl Unpin for ScopeValue
impl UnsafeUnpin for ScopeValue
impl UnwindSafe for ScopeValue
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