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)
pub unsafe fn unchecked_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.
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 From<StyleSource> for Classes
impl From<StyleSource> for Classes
Sourceยงfn from(style_src: StyleSource) -> Classes
fn from(style_src: StyleSource) -> Classes
Converts to this type from the input type.
Sourceยงimpl<T> FromIterator<T> for Classes
impl<T> FromIterator<T> for Classes
Sourceยงimpl ImplicitClone for Classes
impl ImplicitClone for Classes
Sourceยง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<Classes> for Style
impl IntoPropValue<Classes> for Style
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<Classes> for StyleSource
impl IntoPropValue<Classes> for StyleSource
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.impl Eq for Classes
Auto Trait Implementationsยง
impl Freeze for Classes
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยง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.