pub(crate) type MarginVal = GenericMargin<LengthPercentage>;
Aliased Type§
enum MarginVal {
LengthPercentage(LengthPercentage),
Auto,
AnchorSizeFunction(Box<GenericAnchorSizeFunction<LengthPercentage>>),
}
Variants§
LengthPercentage(LengthPercentage)
A <length-percentage>
value.
Auto
An auto
value.
AnchorSizeFunction(Box<GenericAnchorSizeFunction<LengthPercentage>>)
Margin size defined by the anchor element.
https://drafts.csswg.org/css-anchor-position-1/#funcdef-anchor-size
Implementations
Source§impl GenericMargin<LengthPercentage>
impl GenericMargin<LengthPercentage>
Sourcepub fn is_definitely_zero(&self) -> bool
pub fn is_definitely_zero(&self) -> bool
Returns true if the computed value is absolute 0 or 0%.
Trait Implementations
Source§impl<LP> Animate for GenericMargin<LP>
impl<LP> Animate for GenericMargin<LP>
Source§fn animate(
&self,
other: &GenericMargin<LP>,
procedure: Procedure,
) -> Result<GenericMargin<LP>, ()>
fn animate( &self, other: &GenericMargin<LP>, procedure: Procedure, ) -> Result<GenericMargin<LP>, ()>
Animate a value towards another one, given an animation procedure.
Source§impl<LP> Clone for GenericMargin<LP>where
LP: Clone,
impl<LP> Clone for GenericMargin<LP>where
LP: Clone,
Source§fn clone(&self) -> GenericMargin<LP>
fn clone(&self) -> GenericMargin<LP>
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<LP> ComputeSquaredDistance for GenericMargin<LP>
impl<LP> ComputeSquaredDistance for GenericMargin<LP>
Source§fn compute_squared_distance(
&self,
other: &GenericMargin<LP>,
) -> Result<SquaredDistance, ()>
fn compute_squared_distance( &self, other: &GenericMargin<LP>, ) -> Result<SquaredDistance, ()>
Computes the squared distance between two animatable values.
Source§impl<LP> Debug for GenericMargin<LP>where
LP: Debug,
impl<LP> Debug for GenericMargin<LP>where
LP: Debug,
Source§impl<LP> MallocSizeOf for GenericMargin<LP>where
LP: MallocSizeOf,
impl<LP> MallocSizeOf for GenericMargin<LP>where
LP: MallocSizeOf,
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<LP> PartialEq for GenericMargin<LP>where
LP: PartialEq,
impl<LP> PartialEq for GenericMargin<LP>where
LP: PartialEq,
Source§impl<LP> SpecifiedValueInfo for GenericMargin<LP>where
LP: SpecifiedValueInfo,
impl<LP> SpecifiedValueInfo for GenericMargin<LP>where
LP: SpecifiedValueInfo,
Source§fn collect_completion_keywords(f: &mut dyn FnMut(&[&'static str]))
fn collect_completion_keywords(f: &mut dyn FnMut(&[&'static str]))
Collect value starting words for the given specified value type.
This includes keyword and function names which can appear at the
beginning of a value of this type. Read more
Source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Supported CssTypes by the given value type. Read more
Source§impl<LP> ToAnimatedValue for GenericMargin<LP>where
LP: ToAnimatedValue,
impl<LP> ToAnimatedValue for GenericMargin<LP>where
LP: ToAnimatedValue,
Source§type AnimatedValue = GenericMargin<<LP as ToAnimatedValue>::AnimatedValue>
type AnimatedValue = GenericMargin<<LP as ToAnimatedValue>::AnimatedValue>
The type of the animated value.
Source§fn from_animated_value(
from: <GenericMargin<LP> as ToAnimatedValue>::AnimatedValue,
) -> GenericMargin<LP>
fn from_animated_value( from: <GenericMargin<LP> as ToAnimatedValue>::AnimatedValue, ) -> GenericMargin<LP>
Converts back an animated value into a computed value.
Source§fn to_animated_value(
self,
context: &Context<'_>,
) -> <GenericMargin<LP> as ToAnimatedValue>::AnimatedValue
fn to_animated_value( self, context: &Context<'_>, ) -> <GenericMargin<LP> as ToAnimatedValue>::AnimatedValue
Converts this value to an animated value.
Source§impl<LP> ToAnimatedZero for GenericMargin<LP>where
LP: ToAnimatedZero,
impl<LP> ToAnimatedZero for GenericMargin<LP>where
LP: ToAnimatedZero,
Source§fn to_animated_zero(&self) -> Result<GenericMargin<LP>, ()>
fn to_animated_zero(&self) -> Result<GenericMargin<LP>, ()>
Returns a value that, when added with an underlying value, will produce the underlying
value. This is used for SMIL animation’s “by-animation” where SMIL first interpolates from
the zero value to the ‘by’ value, and then adds the result to the underlying value. Read more
Source§impl<LP> ToComputedValue for GenericMargin<LP>where
LP: ToComputedValue,
impl<LP> ToComputedValue for GenericMargin<LP>where
LP: ToComputedValue,
Source§type ComputedValue = GenericMargin<<LP as ToComputedValue>::ComputedValue>
type ComputedValue = GenericMargin<<LP as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
Source§fn from_computed_value(
from: &<GenericMargin<LP> as ToComputedValue>::ComputedValue,
) -> GenericMargin<LP>
fn from_computed_value( from: &<GenericMargin<LP> as ToComputedValue>::ComputedValue, ) -> GenericMargin<LP>
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(
&self,
context: &Context<'_>,
) -> <GenericMargin<LP> as ToComputedValue>::ComputedValue
fn to_computed_value( &self, context: &Context<'_>, ) -> <GenericMargin<LP> as ToComputedValue>::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.Source§impl<LP> ToCss for GenericMargin<LP>where
LP: ToCss,
impl<LP> ToCss for GenericMargin<LP>where
LP: ToCss,
Source§impl<LP> ToResolvedValue for GenericMargin<LP>where
LP: ToResolvedValue,
impl<LP> ToResolvedValue for GenericMargin<LP>where
LP: ToResolvedValue,
Source§type ResolvedValue = GenericMargin<<LP as ToResolvedValue>::ResolvedValue>
type ResolvedValue = GenericMargin<<LP as ToResolvedValue>::ResolvedValue>
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(
from: <GenericMargin<LP> as ToResolvedValue>::ResolvedValue,
) -> GenericMargin<LP>
fn from_resolved_value( from: <GenericMargin<LP> as ToResolvedValue>::ResolvedValue, ) -> GenericMargin<LP>
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(
self,
context: &Context<'_>,
) -> <GenericMargin<LP> as ToResolvedValue>::ResolvedValue
fn to_resolved_value( self, context: &Context<'_>, ) -> <GenericMargin<LP> as ToResolvedValue>::ResolvedValue
Convert a resolved value to a resolved value.
Source§impl<LP> ToShmem for GenericMargin<LP>where
LP: ToShmem,
impl<LP> ToShmem for GenericMargin<LP>where
LP: ToShmem,
Source§fn to_shmem(
&self,
builder: &mut SharedMemoryBuilder,
) -> Result<ManuallyDrop<GenericMargin<LP>>, String>
fn to_shmem( &self, builder: &mut SharedMemoryBuilder, ) -> Result<ManuallyDrop<GenericMargin<LP>>, String>
Clones this value into a form suitable for writing into a
SharedMemoryBuilder. Read more