pub struct ScopeSelector {
    pub path: ScopeStack,
    pub excludes: Vec<ScopeStack>,
}Expand description
A single selector consisting of a stack to match and a possible stack to exclude from being matched.
You probably want ScopeSelectors which is this but with union support.
Fields§
§path: ScopeStack§excludes: Vec<ScopeStack>Implementations§
Source§impl ScopeSelector
 
impl ScopeSelector
Sourcepub fn does_match(&self, stack: &[Scope]) -> Option<MatchPower>
 
pub fn does_match(&self, stack: &[Scope]) -> Option<MatchPower>
Checks if this selector matches a given scope stack.
See ScopeSelectors::does_match for more info.
Sourcepub fn extract_single_scope(&self) -> Option<Scope>
 
pub fn extract_single_scope(&self) -> Option<Scope>
If this selector is really just a single scope, return it
Sourcepub fn extract_scopes(&self) -> Vec<Scope>
 
pub fn extract_scopes(&self) -> Vec<Scope>
Extract all selectors for generating CSS
Trait Implementations§
Source§impl Clone for ScopeSelector
 
impl Clone for ScopeSelector
Source§fn clone(&self) -> ScopeSelector
 
fn clone(&self) -> ScopeSelector
Returns a duplicate of the value. Read more
1.0.0 · 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 ScopeSelector
 
impl Debug for ScopeSelector
Source§impl Default for ScopeSelector
 
impl Default for ScopeSelector
Source§fn default() -> ScopeSelector
 
fn default() -> ScopeSelector
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScopeSelector
 
impl<'de> Deserialize<'de> for ScopeSelector
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
Source§impl FromStr for ScopeSelector
 
impl FromStr for ScopeSelector
Source§fn from_str(s: &str) -> Result<ScopeSelector, ParseScopeError>
 
fn from_str(s: &str) -> Result<ScopeSelector, ParseScopeError>
Parses a scope stack followed optionally by (one or more) “ -“ and then a scope stack to exclude
Source§type Err = ParseScopeError
 
type Err = ParseScopeError
The associated error which can be returned from parsing.
Source§impl PartialEq for ScopeSelector
 
impl PartialEq for ScopeSelector
Source§impl Serialize for ScopeSelector
 
impl Serialize for ScopeSelector
impl Eq for ScopeSelector
impl StructuralPartialEq for ScopeSelector
Auto Trait Implementations§
impl Freeze for ScopeSelector
impl RefUnwindSafe for ScopeSelector
impl Send for ScopeSelector
impl Sync for ScopeSelector
impl Unpin for ScopeSelector
impl UnwindSafe for ScopeSelector
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,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.