Struct savory_style::style::StyleValues [−][src]
Implementations
impl StyleValues
[src]
pub fn get(&self, key: &St) -> Option<&str>
[src]
pub fn add(self, key: impl Into<St>, value: impl ToString) -> Self
[src]
This method provied a way to add custom style or css style that doesn’t have it’s own method yet.
use savory_style::{StyleValues, UpdateStyleValues, values as val, St}; let mut map = StyleValues::default(); map.add(St::UserSelect, val::None) .add(St::BoxSizing, val::BorderBox);
pub fn try_add(self, key: impl Into<St>, value: Option<impl ToString>) -> Self
[src]
This method is similar add
but it accept an optional value, if the
passed value is None
then nothing added to the style.
pub fn add_custom(
self,
key: impl Into<Cow<'static, str>>,
value: impl ToString
) -> Self
[src]
self,
key: impl Into<Cow<'static, str>>,
value: impl ToString
) -> Self
pub fn try_add_custom(
self,
key: impl Into<Cow<'static, str>>,
value: Option<impl ToString>
) -> Self
[src]
self,
key: impl Into<Cow<'static, str>>,
value: Option<impl ToString>
) -> Self
pub fn merge(self, other: impl UpdateStyleValues) -> Self
[src]
Merge this style map with other
pub fn try_merge(self, other: Option<impl UpdateStyleValues>) -> Self
[src]
This method is similar to merge
but it accept an optional value.
Trait Implementations
impl Clone for StyleValues
[src]
fn clone(&self) -> StyleValues
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StyleValues
[src]
impl Default for StyleValues
[src]
fn default() -> StyleValues
[src]
impl<__IdxT> Index<__IdxT> for StyleValues where
IndexMap<St, String>: Index<__IdxT>,
[src]
IndexMap<St, String>: Index<__IdxT>,
type Output = <IndexMap<St, String> as Index<__IdxT>>::Output
The returned type after indexing.
fn index(&self, idx: __IdxT) -> &Self::Output
[src]
impl<__IdxT> IndexMut<__IdxT> for StyleValues where
IndexMap<St, String>: IndexMut<__IdxT>,
[src]
IndexMap<St, String>: IndexMut<__IdxT>,
impl IntoIterator for StyleValues
[src]
type Item = <IndexMap<St, String> as IntoIterator>::Item
The type of the elements being iterated over.
type IntoIter = <IndexMap<St, String> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl PartialEq<StyleValues> for StyleValues
[src]
fn eq(&self, other: &StyleValues) -> bool
[src]
fn ne(&self, other: &StyleValues) -> bool
[src]
impl StructuralPartialEq for StyleValues
[src]
Auto Trait Implementations
impl RefUnwindSafe for StyleValues
impl Send for StyleValues
impl Sync for StyleValues
impl Unpin for StyleValues
impl UnwindSafe for StyleValues
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
[src]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,