[][src]Struct orbtk::Selector

pub struct Selector {
    pub id: Option<String>,
    pub element: Option<String>,
    pub classes: HashSet<String, RandomState>,
    pub pseudo_classes: HashSet<String, RandomState>,
    pub relation: Option<Box<SelectorRelation>>,
    pub dirty: bool,
}

Describes a css selector.

Fields

id: Option<String>element: Option<String>classes: HashSet<String, RandomState>pseudo_classes: HashSet<String, RandomState>relation: Option<Box<SelectorRelation>>dirty: bool

Methods

impl Selector[src]

Inner selector value.

pub fn new() -> Selector[src]

pub fn is_empty(&self) -> bool[src]

pub fn dirty(&self) -> bool[src]

pub fn set_dirty(&mut self, dirty: bool)[src]

pub fn specificity(&self) -> Specificity[src]

pub fn matches(&self, other: &Selector) -> bool[src]

pub fn with<S>(self, element: S) -> Selector where
    S: Into<String>, 
[src]

pub fn id<S>(self, id: S) -> Selector where
    S: Into<String>, 
[src]

pub fn class<S>(self, class: S) -> Selector where
    S: Into<String>, 
[src]

pub fn without_class<S>(self, class: S) -> Selector where
    S: Into<String>, 
[src]

pub fn pseudo_class<S>(self, pseudo_class: S) -> Selector where
    S: Into<String>, 
[src]

pub fn without_pseudo_class<S>(self, pseudo_class: S) -> Selector where
    S: Into<String>, 
[src]

Trait Implementations

impl<'_> IntoPropertySource<Selector> for (&'_ str, Entity)[src]

impl IntoPropertySource<Selector> for Selector[src]

impl IntoPropertySource<Selector> for String[src]

impl IntoPropertySource<Selector> for (String, Entity)[src]

impl IntoPropertySource<Selector> for Entity[src]

impl<'_> IntoPropertySource<Selector> for &'_ str[src]

impl Display for Selector[src]

impl Default for Selector[src]

impl From<String> for Selector[src]

impl<'_> From<&'_ str> for Selector[src]

impl Clone for Selector[src]

impl Debug for Selector[src]

impl PartialEq<Selector> for Selector[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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

impl<E> Component for E where
    E: Any
[src]

impl<T> SetParameter for T