[][src]Struct yew::virtual_dom::Classes

pub struct Classes { /* fields omitted */ }

A set of classes.

Implementations

impl Classes[src]

pub fn new() -> Self[src]

Creates an empty set of classes.

pub fn push(&mut self, class: &str)[src]

Adds a class to a set.

If the provided class has already been added, this method will ignore it.

pub fn contains(&self, class: &str) -> bool[src]

Check the set contains a class.

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

Check the set is empty.

pub fn extend<T: Into<Classes>>(self, other: T) -> Self[src]

Adds other classes to this set of classes; returning itself.

Takes the logical union of both Classes.

Trait Implementations

impl Clone for Classes[src]

impl Debug for Classes[src]

impl Default for Classes[src]

impl<'_, T: AsRef<str>> From<&'_ Option<T>> for Classes[src]

impl<'_> From<&'_ String> for Classes[src]

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

impl<T: AsRef<str>> From<Option<T>> for Classes[src]

impl From<String> for Classes[src]

impl<T: AsRef<str>> From<Vec<T>> for Classes[src]

impl PartialEq<Classes> for Classes[src]

impl ToString for Classes[src]

Auto Trait Implementations

impl RefUnwindSafe for Classes

impl Send for Classes

impl Sync for Classes

impl Unpin for Classes

impl UnwindSafe for Classes

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> CloneAny for T where
    T: Clone + Any
[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> 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.