pub struct Classes { /* private fields */ }Expand description
A set of classes, cheap to clone.
The preferred way of creating this is using the classes! macro.
Implementations§
source§impl 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)
 
pub fn push<T>(&mut self, class: T)
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<IString>,
 
pub unsafe fn unchecked_push<T>(&mut self, class: T)where
    T: Into<IString>,
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 and it is not
empty. Using push()  is preferred.
Trait Implementations§
source§impl<T> Extend<T> for Classes
 
impl<T> Extend<T> for Classes
source§fn 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
source§fn 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.
source§fn 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
source§impl<T> FromIterator<T> for Classes
 
impl<T> FromIterator<T> for Classes
source§impl ImplicitClone for Classes
 
impl ImplicitClone for Classes
§fn implicit_clone(&self) -> Self
 
fn implicit_clone(&self) -> Self
This function is not magic; it is literally defined as Read more
source§impl IntoIterator for &Classes
 
impl IntoIterator for &Classes
source§impl IntoIterator for Classes
 
impl IntoIterator for Classes
source§impl IntoPropValue<Classes> for &'static str
 
impl IntoPropValue<Classes> for &'static str
source§fn into_prop_value(self) -> Classes
 
fn into_prop_value(self) -> Classes
Convert 
self to a value of a Properties struct.source§impl IntoPropValue<IString> for Classes
 
impl IntoPropValue<IString> for Classes
source§fn into_prop_value(self) -> IString
 
fn into_prop_value(self) -> IString
Convert 
self to a value of a Properties struct.source§impl IntoPropValue<Option<IString>> for Classes
 
impl IntoPropValue<Option<IString>> for Classes
source§fn into_prop_value(self) -> Option<IString>
 
fn into_prop_value(self) -> Option<IString>
Convert 
self to a value of a Properties struct.source§impl PartialEq for Classes
 
impl PartialEq for Classes
impl Eq for Classes
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§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoPropValue<Option<T>> for T
 
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
 
fn into_prop_value(self) -> Option<T>
Convert 
self to a value of a Properties struct.source§impl<T> IntoPropValue<T> for T
 
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
 
fn into_prop_value(self) -> T
Convert 
self to a value of a Properties struct.