layout_2020::taffy::stylo_taffy::convert::stylo

Type Alias InsetVal

Source
pub(crate) type InsetVal = Inset<Percentage, LengthPercentage>;

Aliased Type§

enum InsetVal {
    LengthPercentage(LengthPercentage),
    Auto,
    AnchorFunction(Box<GenericAnchorFunction<Percentage, LengthPercentage>>),
    AnchorSizeFunction(Box<GenericAnchorSizeFunction<LengthPercentage>>),
}

Variants§

§

LengthPercentage(LengthPercentage)

A <length-percentage> value.

§

Auto

An auto value.

§

AnchorFunction(Box<GenericAnchorFunction<Percentage, LengthPercentage>>)

§

AnchorSizeFunction(Box<GenericAnchorSizeFunction<LengthPercentage>>)

Inset defined by the size of the anchor element.

https://drafts.csswg.org/css-anchor-position-1/#anchor-pos

Implementations

Source§

impl<P, LP> GenericInset<P, LP>

Source

pub fn auto() -> GenericInset<P, LP>

auto value.

Source

pub fn is_auto(&self) -> bool

Return true if it is ‘auto’.

Trait Implementations

Source§

impl<P, LP> Animate for GenericInset<P, LP>

Source§

fn animate( &self, other: &GenericInset<P, LP>, procedure: Procedure, ) -> Result<GenericInset<P, LP>, ()>

Animate a value towards another one, given an animation procedure.
Source§

impl<P, LP> Clone for GenericInset<P, LP>
where P: Clone, LP: Clone,

Source§

fn clone(&self) -> GenericInset<P, LP>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P, LP> ComputeSquaredDistance for GenericInset<P, LP>

Source§

fn compute_squared_distance( &self, other: &GenericInset<P, LP>, ) -> Result<SquaredDistance, ()>

Computes the squared distance between two animatable values.
Source§

impl<P, LP> Debug for GenericInset<P, LP>
where P: Debug, LP: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<P, LP> MallocSizeOf for GenericInset<P, LP>
where P: MallocSizeOf, LP: MallocSizeOf,

Source§

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<P, LP> PartialEq for GenericInset<P, LP>
where P: PartialEq, LP: PartialEq,

Source§

fn eq(&self, other: &GenericInset<P, LP>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P, LP> SpecifiedValueInfo for GenericInset<P, LP>

Source§

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

Supported CssTypes by the given value type. Read more
Source§

impl<P, LP> ToAnimatedValue for GenericInset<P, LP>

Source§

type AnimatedValue = GenericInset<<P as ToAnimatedValue>::AnimatedValue, <LP as ToAnimatedValue>::AnimatedValue>

The type of the animated value.
Source§

fn from_animated_value( from: <GenericInset<P, LP> as ToAnimatedValue>::AnimatedValue, ) -> GenericInset<P, LP>

Converts back an animated value into a computed value.
Source§

fn to_animated_value( self, context: &Context<'_>, ) -> <GenericInset<P, LP> as ToAnimatedValue>::AnimatedValue

Converts this value to an animated value.
Source§

impl<P, LP> ToAnimatedZero for GenericInset<P, LP>

Source§

fn to_animated_zero(&self) -> Result<GenericInset<P, 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<P, LP> ToComputedValue for GenericInset<P, LP>

Source§

type ComputedValue = GenericInset<<P as ToComputedValue>::ComputedValue, <LP as ToComputedValue>::ComputedValue>

The computed value type we’re going to be converted to.
Source§

fn from_computed_value( from: &<GenericInset<P, LP> as ToComputedValue>::ComputedValue, ) -> GenericInset<P, LP>

Convert a computed value to specified value form. Read more
Source§

fn to_computed_value( &self, context: &Context<'_>, ) -> <GenericInset<P, LP> as ToComputedValue>::ComputedValue

Convert a specified value to a computed value, using itself and the data inside the Context.
Source§

impl<P, LP> ToCss for GenericInset<P, LP>
where P: ToCss, LP: ToCss,

Source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Result<(), Error>
where W: Write,

Serialize self in CSS syntax, writing to dest.
Source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more
Source§

impl<P, LP> ToResolvedValue for GenericInset<P, LP>

Source§

type ResolvedValue = GenericInset<<P as ToResolvedValue>::ResolvedValue, <LP as ToResolvedValue>::ResolvedValue>

The resolved value type we’re going to be converted to.
Source§

fn from_resolved_value( from: <GenericInset<P, LP> as ToResolvedValue>::ResolvedValue, ) -> GenericInset<P, LP>

Convert a resolved value to resolved value form.
Source§

fn to_resolved_value( self, context: &Context<'_>, ) -> <GenericInset<P, LP> as ToResolvedValue>::ResolvedValue

Convert a resolved value to a resolved value.
Source§

impl<P, LP> ToShmem for GenericInset<P, LP>
where P: ToShmem, LP: ToShmem,

Source§

fn to_shmem( &self, builder: &mut SharedMemoryBuilder, ) -> Result<ManuallyDrop<GenericInset<P, LP>>, String>

Clones this value into a form suitable for writing into a SharedMemoryBuilder. Read more
Source§

impl<P, LP> StructuralPartialEq for GenericInset<P, LP>