pub struct Classes { /* private fields */ }Expand description
A set of classes.
The preferred way of creating this is using the [classes!][yew::classes!] macro.
Implementations
sourceimpl Classes
impl Classes
sourcepub fn with_capacity(n: usize) -> Classes
pub fn with_capacity(n: usize) -> Classes
Creates an empty set of classes with capacity for n elements. (Does not allocate if n is zero.)
sourcepub fn push<T>(&mut self, class: T)where
T: Into<Classes>,
pub fn push<T>(&mut self, class: T)where
T: Into<Classes>,
Adds a class to a set.
If the provided class has already been added, this method will ignore it.
sourcepub unsafe fn unchecked_push<T>(&mut self, class: T)where
T: Into<Cow<'static, str>>,
pub unsafe fn unchecked_push<T>(&mut self, class: T)where
T: Into<Cow<'static, str>>,
Adds a class to a set.
If the provided class has already been added, this method will ignore it.
This method won’t check if there are multiple classes in the input string.
Safety
This function will not split the string into multiple classes. Please do not use it unless
you are absolutely certain that the string does not contain any whitespace. Using push()
is preferred.
Trait Implementations
sourceimpl<T> Extend<T> for Classeswhere
T: Into<Classes>,
impl<T> Extend<T> for Classeswhere
T: Into<Classes>,
sourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<T> FromIterator<T> for Classeswhere
T: Into<Classes>,
impl<T> FromIterator<T> for Classeswhere
T: Into<Classes>,
sourcefn from_iter<IT>(iter: IT) -> Classeswhere
IT: IntoIterator<Item = T>,
fn from_iter<IT>(iter: IT) -> Classeswhere
IT: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
sourceimpl IntoIterator for Classes
impl IntoIterator for Classes
sourceimpl IntoPropValue<AttrValue> for Classes
impl IntoPropValue<AttrValue> for Classes
sourcefn into_prop_value(self) -> AttrValue
fn into_prop_value(self) -> AttrValue
Convert
self to a value of a Properties struct.sourceimpl IntoPropValue<Classes> for &'static str
impl IntoPropValue<Classes> for &'static str
sourcefn into_prop_value(self) -> Classes
fn into_prop_value(self) -> Classes
Convert
self to a value of a Properties struct.sourceimpl IntoPropValue<Option<AttrValue>> for Classes
impl IntoPropValue<Option<AttrValue>> for Classes
sourcefn into_prop_value(self) -> Option<AttrValue>
fn into_prop_value(self) -> Option<AttrValue>
Convert
self to a value of a Properties struct.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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
sourcefn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.sourceimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
sourcefn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;