pub struct CssStyleDeclaration {
pub properties: HashMap<String, String>,
}Expand description
CSSStyleDeclaration — a map of property → value.
Fields§
§properties: HashMap<String, String>Implementations§
Source§impl CssStyleDeclaration
impl CssStyleDeclaration
pub fn new() -> Self
pub fn get_property_value(&self, prop: &str) -> Option<&str>
pub fn set_property(&mut self, prop: &str, value: &str)
pub fn remove_property(&mut self, prop: &str)
pub fn to_js_json(&self) -> String
Trait Implementations§
Source§impl Clone for CssStyleDeclaration
impl Clone for CssStyleDeclaration
Source§fn clone(&self) -> CssStyleDeclaration
fn clone(&self) -> CssStyleDeclaration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CssStyleDeclaration
impl Debug for CssStyleDeclaration
Source§impl From<&Vec<Declaration>> for CssStyleDeclaration
impl From<&Vec<Declaration>> for CssStyleDeclaration
Source§fn from(decls: &Vec<Declaration>) -> Self
fn from(decls: &Vec<Declaration>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CssStyleDeclaration
impl RefUnwindSafe for CssStyleDeclaration
impl Send for CssStyleDeclaration
impl Sync for CssStyleDeclaration
impl Unpin for CssStyleDeclaration
impl UnsafeUnpin for CssStyleDeclaration
impl UnwindSafe for CssStyleDeclaration
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