style::values::computed::border

Type Alias LineWidth

Source
pub type LineWidth = Au;
Expand description

A computed value for -webkit-text-stroke-width.

Aliased Type§

struct LineWidth(pub i32);

Fields§

§0: i32

Implementations

Source§

impl Au

Source

pub fn new(value: i32) -> Au

FIXME(pcwalton): Workaround for lack of cross crate inlining of newtype structs!

Source

pub fn scale_by(self, factor: f32) -> Au

Source

pub fn scale_by_trunc(self, factor: f32) -> Au

Scale, but truncate (useful for viewport-relative units)

Source

pub fn from_f64_au(float: f64) -> Au

Source

pub fn from_px(px: i32) -> Au

Source

pub fn to_px(self) -> i32

Round this app unit down to the pixel towards zero and return it.

Source

pub fn ceil_to_px(self) -> i32

Ceil this app unit to the appropriate pixel boundary and return it.

Source

pub fn to_nearest_px(self) -> i32

Source

pub fn to_nearest_pixel(self, pixels_per_px: f32) -> f32

Source

pub fn to_f32_px(self) -> f32

Source

pub fn to_f64_px(self) -> f64

Source

pub fn from_f32_px(px: f32) -> Au

Source

pub fn from_f64_px(px: f64) -> Au

Source

pub fn from_f32_px_trunc(px: f32) -> Au

Source

pub fn from_f64_px_trunc(px: f64) -> Au

Source

pub fn abs(self) -> Au

Source

pub fn max_assign(&mut self, other: Au)

Source

pub fn min_assign(&mut self, other: Au)

Trait Implementations

Source§

impl Add for Au

Source§

type Output = Au

The resulting type after applying the + operator.
Source§

fn add(self, other: Au) -> Au

Performs the + operation. Read more
Source§

impl AddAssign for Au

Source§

fn add_assign(&mut self, other: Au)

Performs the += operation. Read more
Source§

impl Clone for Au

Source§

fn clone(&self) -> Au

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 ComputeSquaredDistance for Au

Source§

fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>

Computes the squared distance between two animatable values.
Source§

impl Debug for Au

Source§

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

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

impl Default for Au

Source§

fn default() -> Au

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Au

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Au, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Div<i32> for Au

Source§

type Output = Au

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Au

Performs the / operation. Read more
Source§

impl Div for Au

Source§

type Output = i32

The resulting type after applying the / operator.
Source§

fn div(self, other: Au) -> i32

Performs the / operation. Read more
Source§

impl DivAssign<i32> for Au

Source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
Source§

impl From<CSSPixelLength> for Au

Source§

fn from(len: CSSPixelLength) -> Self

Converts to this type from the input type.
Source§

impl From<NonNegative<CSSPixelLength>> for Au

Source§

fn from(non_negative_len: NonNegativeLength) -> Self

Converts to this type from the input type.
Source§

impl Hash for Au

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl MallocSizeOf for Au

Source§

fn size_of(&self, _: &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 Mul<i32> for Au

Source§

type Output = Au

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Au

Performs the * operation. Read more
Source§

impl MulAssign<i32> for Au

Source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
Source§

impl Neg for Au

Source§

type Output = Au

The resulting type after applying the - operator.
Source§

fn neg(self) -> Au

Performs the unary - operation. Read more
Source§

impl Ord for Au

Source§

fn cmp(&self, other: &Au) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Au

Source§

fn eq(&self, other: &Au) -> 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 PartialOrd for Au

Source§

fn partial_cmp(&self, other: &Au) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem<i32> for Au

Source§

type Output = Au

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Au

Performs the % operation. Read more
Source§

impl Rem for Au

Source§

type Output = Au

The resulting type after applying the % operator.
Source§

fn rem(self, other: Au) -> Au

Performs the % operation. Read more
Source§

impl Serialize for Au

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sub for Au

Source§

type Output = Au

The resulting type after applying the - operator.
Source§

fn sub(self, other: Au) -> Au

Performs the - operation. Read more
Source§

impl SubAssign for Au

Source§

fn sub_assign(&mut self, other: Au)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a Au> for Au

Source§

fn sum<I>(iter: I) -> Au
where I: Iterator<Item = &'a Au>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for Au

Source§

fn sum<I>(iter: I) -> Au
where I: Iterator<Item = Au>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl ToAnimatedValue for Au

Source§

type AnimatedValue = CSSPixelLength

The type of the animated value.
Source§

fn to_animated_value(self, context: &Context<'_>) -> Self::AnimatedValue

Converts this value to an animated value.
Source§

fn from_animated_value(animated: Self::AnimatedValue) -> Self

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

impl ToAnimatedZero for Au

Source§

fn to_animated_zero(&self) -> Result<Self, ()>

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 ToCss for Au

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 ToResolvedValue for Au

Source§

type ResolvedValue = CSSPixelLength

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

fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue

Convert a resolved value to a resolved value.
Source§

fn from_resolved_value(resolved: Self::ResolvedValue) -> Self

Convert a resolved value to resolved value form.
Source§

impl Zero for Au

Source§

fn zero() -> Au

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl Copy for Au

Source§

impl Eq for Au

Source§

impl StructuralPartialEq for Au