pub struct AddRule {
pub style_sheet_id: StyleSheetId,
pub rule_text: String,
pub location: SourceRange,
pub node_for_property_syntax_validation: Option<NodeId>,
}Expand description
Inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the
position specified by location.
Fields§
§style_sheet_id: StyleSheetIdThe css style sheet identifier where a new rule should be inserted.
rule_text: StringThe text of a new rule.
location: SourceRangeText position of a new rule in the target style sheet.
node_for_property_syntax_validation: Option<NodeId>NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AddRule
impl<'de> Deserialize<'de> for AddRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Method for AddRule
impl Method for AddRule
const NAME: &'static str = "CSS.addRule"
type ReturnObject = AddRuleReturnObject
fn to_method_call(self, call_id: CallId) -> MethodCall<Self>where
Self: Sized,
impl StructuralPartialEq for AddRule
Auto Trait Implementations§
impl Freeze for AddRule
impl RefUnwindSafe for AddRule
impl Send for AddRule
impl Sync for AddRule
impl Unpin for AddRule
impl UnsafeUnpin for AddRule
impl UnwindSafe for AddRule
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