#[non_exhaustive]pub enum BorderCornerRadius {
Circular(NonNegativeLengthPercentageValue),
Elliptical(NonNegativeLengthPercentageValue, NonNegativeLengthPercentageValue),
}Expand description
A logical or physical corner-radius longhand value.
The grammar is <length-percentage [0,∞]>{1,2}: one value creates a circular radius and two
values specify the horizontal and vertical radii of an ellipse.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Circular(NonNegativeLengthPercentageValue)
One radius used in both dimensions.
Elliptical(NonNegativeLengthPercentageValue, NonNegativeLengthPercentageValue)
Separate horizontal and vertical radii.
Implementations§
Source§impl BorderCornerRadius
impl BorderCornerRadius
Sourcepub fn circular(value: CssDimension) -> Self
pub fn circular(value: CssDimension) -> Self
Construct a circular radius from a direct non-negative value.
Sourcepub fn elliptical(horizontal: CssDimension, vertical: CssDimension) -> Self
pub fn elliptical(horizontal: CssDimension, vertical: CssDimension) -> Self
Construct an elliptical radius from direct non-negative values.
Sourcepub fn calculated(expression: impl Into<CssDimensionExpr>) -> Self
pub fn calculated(expression: impl Into<CssDimensionExpr>) -> Self
Construct a circular radius from a typed calculation.
Trait Implementations§
Source§impl Clone for BorderCornerRadius
impl Clone for BorderCornerRadius
Source§impl CssWriteTo for BorderCornerRadius
impl CssWriteTo for BorderCornerRadius
Source§impl Debug for BorderCornerRadius
impl Debug for BorderCornerRadius
Source§impl Display for BorderCornerRadius
impl Display for BorderCornerRadius
Source§impl PartialEq for BorderCornerRadius
impl PartialEq for BorderCornerRadius
impl StructuralPartialEq for BorderCornerRadius
Auto Trait Implementations§
impl Freeze for BorderCornerRadius
impl RefUnwindSafe for BorderCornerRadius
impl Send for BorderCornerRadius
impl Sync for BorderCornerRadius
impl Unpin for BorderCornerRadius
impl UnsafeUnpin for BorderCornerRadius
impl UnwindSafe for BorderCornerRadius
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
impl<T> CheckedCssValue for Twhere
T: CssWriteTo + Sealed,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.