pub struct ClassVisitor { /* private fields */ }

Implementations§

source§

impl ClassVisitor

source

pub fn show(&self, stylesheet: StyleSheet<'_, '_>)

source

pub fn get(&self, class: &str) -> Option<String>

Trait Implementations§

source§

impl Clone for ClassVisitor

source§

fn clone(&self) -> ClassVisitor

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for ClassVisitor

source§

fn default() -> ClassVisitor

Returns the “default value” for a type. Read more
source§

impl PartialEq for ClassVisitor

source§

fn eq(&self, other: &ClassVisitor) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'i> Visitor<'i> for ClassVisitor

§

type Error = ()

The Err value for Results returned by visit_* methods.
source§

fn visit_types(&self) -> VisitTypes

Returns the types of values that this visitor should visit. By default, it returns Self::TYPES, but this can be overridden to change the value at runtime.
source§

fn visit_selector( &mut self, selector: &mut Selector<'i> ) -> Result<(), Self::Error>

Visits a selector.
source§

fn visit_dashed_ident( &mut self, ident: &mut DashedIdent<'_> ) -> Result<(), Self::Error>

Visits a dashed ident.
source§

fn visit_rule_list( &mut self, rules: &mut CssRuleList<'i, T> ) -> Result<(), Self::Error>

Visits a rule list.
source§

fn visit_rule(&mut self, rule: &mut CssRule<'i, T>) -> Result<(), Self::Error>

Visits a rule.
source§

fn visit_declaration_block( &mut self, decls: &mut DeclarationBlock<'i> ) -> Result<(), Self::Error>

Visits a declaration block.
source§

fn visit_property( &mut self, property: &mut Property<'i> ) -> Result<(), Self::Error>

Visits a property.
source§

fn visit_url(&mut self, _url: &mut Url<'i>) -> Result<(), Self::Error>

Visits a url.
source§

fn visit_color(&mut self, color: &mut CssColor) -> Result<(), Self::Error>

Visits a color.
source§

fn visit_image(&mut self, image: &mut Image<'i>) -> Result<(), Self::Error>

Visits an image.
source§

fn visit_length(&mut self, length: &mut LengthValue) -> Result<(), Self::Error>

Visits a length.
source§

fn visit_angle(&mut self, angle: &mut Angle) -> Result<(), Self::Error>

Visits an angle.
source§

fn visit_ratio(&mut self, ratio: &mut Ratio) -> Result<(), Self::Error>

Visits a ratio.
source§

fn visit_resolution( &mut self, resolution: &mut Resolution ) -> Result<(), Self::Error>

Visits a resolution.
source§

fn visit_time(&mut self, time: &mut Time) -> Result<(), Self::Error>

Visits a time.
source§

fn visit_custom_ident( &mut self, ident: &mut CustomIdent<'_> ) -> Result<(), Self::Error>

Visits a custom ident.
source§

fn visit_variable(&mut self, var: &mut Variable<'i>) -> Result<(), Self::Error>

Visits a variable reference.
source§

fn visit_environment_variable( &mut self, env: &mut EnvironmentVariable<'i> ) -> Result<(), Self::Error>

Visits an environment variable reference.
source§

fn visit_media_list( &mut self, media: &mut MediaList<'i> ) -> Result<(), Self::Error>

Visits a media query list.
source§

fn visit_media_query( &mut self, query: &mut MediaQuery<'i> ) -> Result<(), Self::Error>

Visits a media query.
source§

fn visit_media_feature( &mut self, feature: &mut QueryFeature<'i, MediaFeatureId> ) -> Result<(), Self::Error>

Visits a media feature.
source§

fn visit_media_feature_value( &mut self, value: &mut MediaFeatureValue<'i> ) -> Result<(), Self::Error>

Visits a media feature value.
source§

fn visit_supports_condition( &mut self, condition: &mut SupportsCondition<'i> ) -> Result<(), Self::Error>

Visits a supports condition.
source§

fn visit_selector_list( &mut self, selectors: &mut SelectorList<'i, Selectors> ) -> Result<(), Self::Error>

Visits a selector list.
source§

fn visit_function( &mut self, function: &mut Function<'i> ) -> Result<(), Self::Error>

Visits a custom function.
source§

fn visit_token_list( &mut self, tokens: &mut TokenList<'i> ) -> Result<(), Self::Error>

Visits a token list.
source§

fn visit_token( &mut self, token: &mut TokenOrValue<'i> ) -> Result<(), Self::Error>

Visits a token or value in an unparsed property.
source§

impl Eq for ClassVisitor

source§

impl StructuralEq for ClassVisitor

source§

impl StructuralPartialEq for ClassVisitor

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.