Struct style::properties_and_values::registry::PropertyRegistration
source · pub struct PropertyRegistration {
pub name: PropertyRuleName,
pub data: PropertyRegistrationData,
pub url_data: UrlExtraData,
pub source_location: SourceLocation,
}
Expand description
A computed, already-validated property registration. https://drafts.css-houdini.org/css-properties-values-api-1/#custom-property-registration
Fields§
§name: PropertyRuleName
The custom property name.
data: PropertyRegistrationData
The actual information about the property.
url_data: UrlExtraData
The url data that is used to parse and compute the registration’s initial value. Note that it’s not the url data that should be used to parse other values. Other values should use the data of the style sheet where they came from.
source_location: SourceLocation
The source location of this registration, if it comes from a CSS rule.
Implementations§
source§impl PropertyRegistration
impl PropertyRegistration
fn decl_to_css(&self, dest: &mut CssStringWriter) -> Result
source§impl PropertyRegistration
impl PropertyRegistration
sourcepub fn compute_initial_value(
&self,
computed_context: &Context<'_>,
) -> Result<ComputedRegisteredValue, ()>
pub fn compute_initial_value( &self, computed_context: &Context<'_>, ) -> Result<ComputedRegisteredValue, ()>
Computes the value of the computationally independent initial value.
sourcepub fn validate_initial_value(
syntax: &Descriptor,
initial_value: Option<&SpecifiedValue>,
) -> Result<(), PropertyRegistrationError>
pub fn validate_initial_value( syntax: &Descriptor, initial_value: Option<&SpecifiedValue>, ) -> Result<(), PropertyRegistrationError>
Performs syntax validation as per the initial value descriptor. https://drafts.css-houdini.org/css-properties-values-api-1/#initial-value-descriptor
Trait Implementations§
source§impl Clone for PropertyRegistration
impl Clone for PropertyRegistration
source§fn clone(&self) -> PropertyRegistration
fn clone(&self) -> PropertyRegistration
Returns a copy of the value. Read more
1.0.0 · 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 PropertyRegistration
impl Debug for PropertyRegistration
source§impl MallocSizeOf for PropertyRegistration
impl MallocSizeOf for PropertyRegistration
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl ToCssWithGuard for PropertyRegistration
impl ToCssWithGuard for PropertyRegistration
source§fn to_css(
&self,
_guard: &SharedRwLockReadGuard<'_>,
dest: &mut CssStringWriter,
) -> Result
fn to_css( &self, _guard: &SharedRwLockReadGuard<'_>, dest: &mut CssStringWriter, ) -> Result
source§fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
fn to_css_string(&self, guard: &SharedRwLockReadGuard<'_>) -> CssString
Serialize
self
in CSS syntax using the given lock guard and return a string. Read moresource§impl ToShmem for PropertyRegistration
impl ToShmem for PropertyRegistration
Auto Trait Implementations§
impl Freeze for PropertyRegistration
impl RefUnwindSafe for PropertyRegistration
impl Send for PropertyRegistration
impl Sync for PropertyRegistration
impl Unpin for PropertyRegistration
impl UnwindSafe for PropertyRegistration
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert