[][src]Struct seed::dom_types::Style

pub struct Style {
    pub vals: HashMap<String, String>,
}

Handle Style separately from Attrs, since it commonly involves multiple parts, and has a different semantic meaning.

Fields

vals: HashMap<String, String>

Methods

impl Style
[src]

pub fn new(vals: HashMap<String, String>) -> Self
[src]

pub fn empty() -> Self
[src]

pub fn to_string(&self) -> String
[src]

Output style as a string, as would be set in the DOM as the attribute value for 'style'. Eg: "display: flex; font-size: 1.5em"

pub fn add(&mut self, key: &str, val: &str)
[src]

pub fn merge(&self, other: &Self) -> Self
[src]

Combine with another Style; if there's a conflict, use the other one.

Trait Implementations

impl<Ms: Clone> UpdateEl<El<Ms>> for Style
[src]

impl<Ms: Clone, '_> UpdateEl<El<Ms>> for &'_ Style
[src]

impl Clone for Style
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<Style> for Style
[src]

Auto Trait Implementations

impl Send for Style

impl Sync for Style

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.