pub struct ResolveValuesParams<'a> { /* private fields */ }Expand description
Resolve the specified values in the context of the provided element. For example, a value of ‘1em’ is evaluated according to the computed ‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be resolved to ‘3px’. If the ‘propertyName’ was specified the ‘values’ are resolved as if they were property’s declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null ‘propertyName’ was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.’
Implementations§
Source§impl<'a> ResolveValuesParams<'a>
impl<'a> ResolveValuesParams<'a>
pub fn builder( values: Vec<Cow<'a, str>>, nodeId: NodeId, ) -> ResolveValuesParamsBuilder<'a>
pub fn values(&self) -> &[Cow<'a, str>]
pub fn nodeId(&self) -> &NodeId
pub fn propertyName(&self) -> Option<&str>
pub fn pseudoType(&self) -> Option<&PseudoType>
pub fn pseudoIdentifier(&self) -> Option<&str>
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for ResolveValuesParams<'a>
impl<'a> CdpCommand<'a> for ResolveValuesParams<'a>
Source§impl<'a> Clone for ResolveValuesParams<'a>
impl<'a> Clone for ResolveValuesParams<'a>
Source§fn clone(&self) -> ResolveValuesParams<'a>
fn clone(&self) -> ResolveValuesParams<'a>
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<'a> Debug for ResolveValuesParams<'a>
impl<'a> Debug for ResolveValuesParams<'a>
Source§impl<'a> Default for ResolveValuesParams<'a>
impl<'a> Default for ResolveValuesParams<'a>
Source§fn default() -> ResolveValuesParams<'a>
fn default() -> ResolveValuesParams<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for ResolveValuesParams<'a>
impl<'de, 'a> Deserialize<'de> for ResolveValuesParams<'a>
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
Auto Trait Implementations§
impl<'a> Freeze for ResolveValuesParams<'a>
impl<'a> RefUnwindSafe for ResolveValuesParams<'a>
impl<'a> Send for ResolveValuesParams<'a>
impl<'a> Sync for ResolveValuesParams<'a>
impl<'a> Unpin for ResolveValuesParams<'a>
impl<'a> UnsafeUnpin for ResolveValuesParams<'a>
impl<'a> UnwindSafe for ResolveValuesParams<'a>
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