[][src]Struct syntect::highlighting::ScopeSelector

pub struct ScopeSelector { /* fields omitted */ }

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.

Implementations

impl ScopeSelector[src]

pub fn does_match(&self, stack: &[Scope]) -> Option<MatchPower>[src]

Checks if this selector matches a given scope stack. See ScopeSelectors#does_match for more info.

pub fn extract_single_scope(&self) -> Option<Scope>[src]

If this selector is really just a single scope, return it

pub fn extract_scopes(&self) -> Vec<Scope>[src]

extract all selectors for generating css

Trait Implementations

impl Clone for ScopeSelector[src]

impl Debug for ScopeSelector[src]

impl Default for ScopeSelector[src]

impl<'de> Deserialize<'de> for ScopeSelector[src]

impl Eq for ScopeSelector[src]

impl FromStr for ScopeSelector[src]

type Err = ParseScopeError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<ScopeSelector, ParseScopeError>[src]

Parses a scope stack followed optionally by (one or more) " -" and then a scope stack to exclude

impl PartialEq<ScopeSelector> for ScopeSelector[src]

impl Serialize for ScopeSelector[src]

impl StructuralEq for ScopeSelector[src]

impl StructuralPartialEq for ScopeSelector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.