pub struct CSSRuleOM {
pub rule_type: CSSRuleType,
/* private fields */
}Expand description
CSSRule 对象(基类)
表示一个 CSS 规则,是所有 CSS 规则类型的基类。
Fields§
§rule_type: CSSRuleType规则类型
Implementations§
Source§impl CSSRuleOM
impl CSSRuleOM
Sourcepub fn new(rule_type: CSSRuleType, css_text: &str) -> Self
pub fn new(rule_type: CSSRuleType, css_text: &str) -> Self
创建新的 CSSRule
Sourcepub fn get_css_text(&self) -> &str
pub fn get_css_text(&self) -> &str
获取 CSS 文本
Sourcepub fn set_css_text(&mut self, text: &str)
pub fn set_css_text(&mut self, text: &str)
设置 CSS 文本
Sourcepub fn parent_stylesheet(&self) -> Option<&str>
pub fn parent_stylesheet(&self) -> Option<&str>
获取父样式表名称
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CSSRuleOM
impl RefUnwindSafe for CSSRuleOM
impl Send for CSSRuleOM
impl Sync for CSSRuleOM
impl Unpin for CSSRuleOM
impl UnsafeUnpin for CSSRuleOM
impl UnwindSafe for CSSRuleOM
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