pub struct Classes { /* private fields */ }
Expand description
A set of classes.
The preferred way of creating this is using the classes!
macro.
Implementations§
Source§impl Classes
impl Classes
Sourcepub fn with_capacity(n: usize) -> Self
pub fn with_capacity(n: usize) -> Self
Creates an empty set of classes with capacity for n elements. (Does not allocate if n is zero.)
Sourcepub fn push<T: Into<Self>>(&mut self, class: T)
pub fn push<T: Into<Self>>(&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: Into<Cow<'static, str>>>(&mut self, class: T)
pub unsafe fn unchecked_push<T: Into<Cow<'static, str>>>(&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. Using push()
is preferred.
Trait Implementations§
Source§impl<T: Into<Classes>> Extend<T> for Classes
impl<T: Into<Classes>> Extend<T> for Classes
Source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
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: Into<Classes>> FromIterator<T> for Classes
impl<T: Into<Classes>> FromIterator<T> for Classes
Source§fn from_iter<IT: IntoIterator<Item = T>>(iter: IT) -> Self
fn from_iter<IT: IntoIterator<Item = T>>(iter: IT) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for Classes
impl IntoIterator for Classes
Source§impl IntoOptPropValue<Cow<'static, str>> for Classes
impl IntoOptPropValue<Cow<'static, str>> for Classes
Source§fn into_opt_prop_value(self) -> Option<AttrValue>
fn into_opt_prop_value(self) -> Option<AttrValue>
Convert
self
to an optional value of a Properties
struct.Source§impl IntoPropValue<Cow<'static, str>> for Classes
impl IntoPropValue<Cow<'static, str>> for Classes
Source§fn into_prop_value(self) -> AttrValue
fn into_prop_value(self) -> AttrValue
Convert
self
to a value of a Properties
struct.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<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.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.