Struct yew_ansi::ClassStyle
source · pub struct ClassStyle {
pub class: Option<String>,
pub style: Option<String>,
}
Expand description
Combination of classes and inline styles.
While it is possible to use inline styles only, it is not doable with just classes due to the amount of RGB colour values.
Fields§
§class: Option<String>
§style: Option<String>
Implementations§
source§impl ClassStyle
impl ClassStyle
sourcepub fn push_class(&mut self, new: impl Borrow<str>)
pub fn push_class(&mut self, new: impl Borrow<str>)
Push a new class to the classes. This function doesn’t validate the given string in any way.
sourcepub fn push_style(&mut self, new: impl Borrow<str>)
pub fn push_style(&mut self, new: impl Borrow<str>)
Push a new property to the style. This function doesn’t validate the given string in any way.
Trait Implementations§
source§impl Clone for ClassStyle
impl Clone for ClassStyle
source§fn clone(&self) -> ClassStyle
fn clone(&self) -> ClassStyle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClassStyle
impl Debug for ClassStyle
source§impl Default for ClassStyle
impl Default for ClassStyle
source§fn default() -> ClassStyle
fn default() -> ClassStyle
Returns the “default value” for a type. Read more
source§impl PartialEq<ClassStyle> for ClassStyle
impl PartialEq<ClassStyle> for ClassStyle
source§fn eq(&self, other: &ClassStyle) -> bool
fn eq(&self, other: &ClassStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ClassStyle
impl StructuralEq for ClassStyle
impl StructuralPartialEq for ClassStyle
Auto Trait Implementations§
impl RefUnwindSafe for ClassStyle
impl Send for ClassStyle
impl Sync for ClassStyle
impl Unpin for ClassStyle
impl UnwindSafe for ClassStyle
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
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.