#[repr(u16)]
pub enum PropertyDeclaration {
Show 196 variants AlignContent(SpecifiedValue), AlignItems(SpecifiedValue), AlignSelf(SpecifiedValue), AspectRatio(AspectRatio), BackfaceVisibility(SpecifiedValue), BaselineSource(BaselineSource), BorderCollapse(SpecifiedValue), BorderImageRepeat(BorderImageRepeat), BoxSizing(SpecifiedValue), CaptionSide(CaptionSide), Clear(Clear), ColumnCount(ColumnCount), ColumnSpan(SpecifiedValue), ContainerType(ContainerType), Direction(SpecifiedValue), Display(Display), EmptyCells(SpecifiedValue), FlexDirection(SpecifiedValue), FlexWrap(SpecifiedValue), Float(Float), FontLanguageOverride(FontLanguageOverride), FontStretch(FontStretch), FontStyle(FontStyle), FontVariantCaps(SpecifiedValue), FontWeight(FontWeight), ImageRendering(ImageRendering), JustifyContent(SpecifiedValue), ListStylePosition(SpecifiedValue), ListStyleType(SpecifiedValue), MixBlendMode(SpecifiedValue), Opacity(Opacity), Order(Integer), OutlineStyle(OutlineStyle), OverflowWrap(OverflowWrap), PointerEvents(SpecifiedValue), Position(SpecifiedValue), ServoOverflowClipBox(SpecifiedValue), ServoTopLayer(SpecifiedValue), TableLayout(SpecifiedValue), TextAlign(TextAlign), TextAlignLast(TextAlignLast), TextDecorationLine(TextDecorationLine), TextDecorationStyle(SpecifiedValue), TextJustify(TextJustify), TextRendering(SpecifiedValue), TextTransform(TextTransform), TextWrapMode(SpecifiedValue), TransformStyle(TransformStyle), UnicodeBidi(SpecifiedValue), Visibility(SpecifiedValue), WhiteSpaceCollapse(SpecifiedValue), WordBreak(WordBreak), WritingMode(SpecifiedValue), ZIndex(ZIndex), Zoom(Zoom), FlexGrow(NonNegativeNumber), FlexShrink(NonNegativeNumber), OverflowBlock(Overflow), OverflowInline(Overflow), OverflowX(Overflow), OverflowY(Overflow), BorderBlockEndStyle(BorderStyle), BorderBlockStartStyle(BorderStyle), BorderBottomStyle(BorderStyle), BorderInlineEndStyle(BorderStyle), BorderInlineStartStyle(BorderStyle), BorderLeftStyle(BorderStyle), BorderRightStyle(BorderStyle), BorderTopStyle(BorderStyle), AnimationComposition(SpecifiedValue), AnimationDelay(SpecifiedValue), AnimationDirection(SpecifiedValue), AnimationDuration(SpecifiedValue), AnimationFillMode(SpecifiedValue), AnimationIterationCount(SpecifiedValue), AnimationName(SpecifiedValue), AnimationPlayState(SpecifiedValue), AnimationTimeline(SpecifiedValue), AnimationTimingFunction(SpecifiedValue), BackgroundAttachment(SpecifiedValue), BackgroundClip(SpecifiedValue), BackgroundImage(SpecifiedValue), BackgroundOrigin(SpecifiedValue), BackgroundPositionX(SpecifiedValue), BackgroundPositionY(SpecifiedValue), BackgroundRepeat(SpecifiedValue), BackgroundSize(SpecifiedValue), BorderImageOutset(Box<NonNegativeLengthOrNumberRect>), BorderImageSlice(Box<BorderImageSlice>), BorderImageWidth(Box<BorderImageWidth>), BorderSpacing(Box<BorderSpacing>), BoxShadow(SpecifiedValue), Clip(Box<ClipRectOrAuto>), Color(ColorPropertyValue), ColumnGap(NonNegativeLengthPercentageOrNormal), ColumnWidth(NonNegativeLengthOrAuto), ContainerName(ContainerName), Content(Content), CounterIncrement(CounterIncrement), CounterReset(CounterReset), Cursor(Cursor), Filter(SpecifiedValue), FlexBasis(Box<FlexBasis>), FontFamily(FontFamily), FontSize(FontSize), LetterSpacing(LetterSpacing), LineHeight(LineHeight), OutlineOffset(Length), Perspective(Perspective), PerspectiveOrigin(Box<Position>), Quotes(Quotes), Rotate(Box<Rotate>), Scale(Box<Scale>), TextIndent(TextIndent), TextOverflow(Box<TextOverflow>), TextShadow(SpecifiedValue), Transform(Transform), TransformOrigin(Box<TransformOrigin>), TransitionBehavior(SpecifiedValue), TransitionDelay(SpecifiedValue), TransitionDuration(SpecifiedValue), TransitionProperty(SpecifiedValue), TransitionTimingFunction(SpecifiedValue), Translate(Box<Translate>), VerticalAlign(VerticalAlign), WordSpacing(WordSpacing), XLang(XLang), BorderImageSource(Box<Image>), ListStyleImage(Box<Image>), MaxBlockSize(MaxSize), MaxHeight(MaxSize), MaxInlineSize(MaxSize), MaxWidth(MaxSize), BorderBottomLeftRadius(Box<BorderCornerRadius>), BorderBottomRightRadius(Box<BorderCornerRadius>), BorderEndEndRadius(Box<BorderCornerRadius>), BorderEndStartRadius(Box<BorderCornerRadius>), BorderStartEndRadius(Box<BorderCornerRadius>), BorderStartStartRadius(Box<BorderCornerRadius>), BorderTopLeftRadius(Box<BorderCornerRadius>), BorderTopRightRadius(Box<BorderCornerRadius>), PaddingBlockEnd(NonNegativeLengthPercentage), PaddingBlockStart(NonNegativeLengthPercentage), PaddingBottom(NonNegativeLengthPercentage), PaddingInlineEnd(NonNegativeLengthPercentage), PaddingInlineStart(NonNegativeLengthPercentage), PaddingLeft(NonNegativeLengthPercentage), PaddingRight(NonNegativeLengthPercentage), PaddingTop(NonNegativeLengthPercentage), BlockSize(Size), Height(Size), InlineSize(Size), MinBlockSize(Size), MinHeight(Size), MinInlineSize(Size), MinWidth(Size), Width(Size), BorderBlockEndWidth(BorderSideWidth), BorderBlockStartWidth(BorderSideWidth), BorderBottomWidth(BorderSideWidth), BorderInlineEndWidth(BorderSideWidth), BorderInlineStartWidth(BorderSideWidth), BorderLeftWidth(BorderSideWidth), BorderRightWidth(BorderSideWidth), BorderTopWidth(BorderSideWidth), OutlineWidth(BorderSideWidth), BackgroundColor(Color), BorderBlockEndColor(Color), BorderBlockStartColor(Color), BorderBottomColor(Color), BorderInlineEndColor(Color), BorderInlineStartColor(Color), BorderLeftColor(Color), BorderRightColor(Color), BorderTopColor(Color), OutlineColor(Color), TextDecorationColor(Color), Bottom(LengthPercentageOrAuto), InsetBlockEnd(LengthPercentageOrAuto), InsetBlockStart(LengthPercentageOrAuto), InsetInlineEnd(LengthPercentageOrAuto), InsetInlineStart(LengthPercentageOrAuto), Left(LengthPercentageOrAuto), MarginBlockEnd(LengthPercentageOrAuto), MarginBlockStart(LengthPercentageOrAuto), MarginBottom(LengthPercentageOrAuto), MarginInlineEnd(LengthPercentageOrAuto), MarginInlineStart(LengthPercentageOrAuto), MarginLeft(LengthPercentageOrAuto), MarginRight(LengthPercentageOrAuto), MarginTop(LengthPercentageOrAuto), Right(LengthPercentageOrAuto), Top(LengthPercentageOrAuto), CSSWideKeyword(WideKeywordDeclaration), WithVariables(VariableDeclaration), Custom(CustomDeclaration),
}
Expand description

Servo’s representation for a property declaration.

Variants§

§

AlignContent(SpecifiedValue)

align-content

§

AlignItems(SpecifiedValue)

align-items

§

AlignSelf(SpecifiedValue)

align-self

§

AspectRatio(AspectRatio)

aspect-ratio

§

BackfaceVisibility(SpecifiedValue)

backface-visibility

§

BaselineSource(BaselineSource)

baseline-source

§

BorderCollapse(SpecifiedValue)

border-collapse

§

BorderImageRepeat(BorderImageRepeat)

border-image-repeat

§

BoxSizing(SpecifiedValue)

box-sizing

§

CaptionSide(CaptionSide)

caption-side

§

Clear(Clear)

clear

§

ColumnCount(ColumnCount)

column-count

§

ColumnSpan(SpecifiedValue)

column-span

§

ContainerType(ContainerType)

container-type

§

Direction(SpecifiedValue)

direction

§

Display(Display)

display

§

EmptyCells(SpecifiedValue)

empty-cells

§

FlexDirection(SpecifiedValue)

flex-direction

§

FlexWrap(SpecifiedValue)

flex-wrap

§

Float(Float)

float

§

FontLanguageOverride(FontLanguageOverride)

font-language-override

§

FontStretch(FontStretch)

font-stretch

§

FontStyle(FontStyle)

font-style

§

FontVariantCaps(SpecifiedValue)

font-variant-caps

§

FontWeight(FontWeight)

font-weight

§

ImageRendering(ImageRendering)

image-rendering

§

JustifyContent(SpecifiedValue)

justify-content

§

ListStylePosition(SpecifiedValue)

list-style-position

§

ListStyleType(SpecifiedValue)

list-style-type

§

MixBlendMode(SpecifiedValue)

mix-blend-mode

§

Opacity(Opacity)

opacity

§

Order(Integer)

order

§

OutlineStyle(OutlineStyle)

outline-style

§

OverflowWrap(OverflowWrap)

overflow-wrap

§

PointerEvents(SpecifiedValue)

pointer-events

§

Position(SpecifiedValue)

position

§

ServoOverflowClipBox(SpecifiedValue)

-servo-overflow-clip-box

§

ServoTopLayer(SpecifiedValue)

-servo-top-layer

§

TableLayout(SpecifiedValue)

table-layout

§

TextAlign(TextAlign)

text-align

§

TextAlignLast(TextAlignLast)

text-align-last

§

TextDecorationLine(TextDecorationLine)

text-decoration-line

§

TextDecorationStyle(SpecifiedValue)

text-decoration-style

§

TextJustify(TextJustify)

text-justify

§

TextRendering(SpecifiedValue)

text-rendering

§

TextTransform(TextTransform)

text-transform

§

TextWrapMode(SpecifiedValue)

text-wrap-mode

§

TransformStyle(TransformStyle)

transform-style

§

UnicodeBidi(SpecifiedValue)

unicode-bidi

§

Visibility(SpecifiedValue)

visibility

§

WhiteSpaceCollapse(SpecifiedValue)

white-space-collapse

§

WordBreak(WordBreak)

word-break

§

WritingMode(SpecifiedValue)

writing-mode

§

ZIndex(ZIndex)

z-index

§

Zoom(Zoom)

zoom

§

FlexGrow(NonNegativeNumber)

flex-grow

§

FlexShrink(NonNegativeNumber)

flex-shrink

§

OverflowBlock(Overflow)

overflow-block

§

OverflowInline(Overflow)

overflow-inline

§

OverflowX(Overflow)

overflow-x

§

OverflowY(Overflow)

overflow-y

§

BorderBlockEndStyle(BorderStyle)

border-block-end-style

§

BorderBlockStartStyle(BorderStyle)

border-block-start-style

§

BorderBottomStyle(BorderStyle)

border-bottom-style

§

BorderInlineEndStyle(BorderStyle)

border-inline-end-style

§

BorderInlineStartStyle(BorderStyle)

border-inline-start-style

§

BorderLeftStyle(BorderStyle)

border-left-style

§

BorderRightStyle(BorderStyle)

border-right-style

§

BorderTopStyle(BorderStyle)

border-top-style

§

AnimationComposition(SpecifiedValue)

animation-composition

§

AnimationDelay(SpecifiedValue)

animation-delay

§

AnimationDirection(SpecifiedValue)

animation-direction

§

AnimationDuration(SpecifiedValue)

animation-duration

§

AnimationFillMode(SpecifiedValue)

animation-fill-mode

§

AnimationIterationCount(SpecifiedValue)

animation-iteration-count

§

AnimationName(SpecifiedValue)

animation-name

§

AnimationPlayState(SpecifiedValue)

animation-play-state

§

AnimationTimeline(SpecifiedValue)

animation-timeline

§

AnimationTimingFunction(SpecifiedValue)

animation-timing-function

§

BackgroundAttachment(SpecifiedValue)

background-attachment

§

BackgroundClip(SpecifiedValue)

background-clip

§

BackgroundImage(SpecifiedValue)

background-image

§

BackgroundOrigin(SpecifiedValue)

background-origin

§

BackgroundPositionX(SpecifiedValue)

background-position-x

§

BackgroundPositionY(SpecifiedValue)

background-position-y

§

BackgroundRepeat(SpecifiedValue)

background-repeat

§

BackgroundSize(SpecifiedValue)

background-size

§

BorderImageOutset(Box<NonNegativeLengthOrNumberRect>)

border-image-outset

§

BorderImageSlice(Box<BorderImageSlice>)

border-image-slice

§

BorderImageWidth(Box<BorderImageWidth>)

border-image-width

§

BorderSpacing(Box<BorderSpacing>)

border-spacing

§

BoxShadow(SpecifiedValue)

box-shadow

§

Clip(Box<ClipRectOrAuto>)

clip

§

Color(ColorPropertyValue)

color

§

ColumnGap(NonNegativeLengthPercentageOrNormal)

column-gap

§

ColumnWidth(NonNegativeLengthOrAuto)

column-width

§

ContainerName(ContainerName)

container-name

§

Content(Content)

content

§

CounterIncrement(CounterIncrement)

counter-increment

§

CounterReset(CounterReset)

counter-reset

§

Cursor(Cursor)

cursor

§

Filter(SpecifiedValue)

filter

§

FlexBasis(Box<FlexBasis>)

flex-basis

§

FontFamily(FontFamily)

font-family

§

FontSize(FontSize)

font-size

§

LetterSpacing(LetterSpacing)

letter-spacing

§

LineHeight(LineHeight)

line-height

§

OutlineOffset(Length)

outline-offset

§

Perspective(Perspective)

perspective

§

PerspectiveOrigin(Box<Position>)

perspective-origin

§

Quotes(Quotes)

quotes

§

Rotate(Box<Rotate>)

rotate

§

Scale(Box<Scale>)

scale

§

TextIndent(TextIndent)

text-indent

§

TextOverflow(Box<TextOverflow>)

text-overflow

§

TextShadow(SpecifiedValue)

text-shadow

§

Transform(Transform)

transform

§

TransformOrigin(Box<TransformOrigin>)

transform-origin

§

TransitionBehavior(SpecifiedValue)

transition-behavior

§

TransitionDelay(SpecifiedValue)

transition-delay

§

TransitionDuration(SpecifiedValue)

transition-duration

§

TransitionProperty(SpecifiedValue)

transition-property

§

TransitionTimingFunction(SpecifiedValue)

transition-timing-function

§

Translate(Box<Translate>)

translate

§

VerticalAlign(VerticalAlign)

vertical-align

§

WordSpacing(WordSpacing)

word-spacing

§

XLang(XLang)

-x-lang

§

BorderImageSource(Box<Image>)

border-image-source

§

ListStyleImage(Box<Image>)

list-style-image

§

MaxBlockSize(MaxSize)

max-block-size

§

MaxHeight(MaxSize)

max-height

§

MaxInlineSize(MaxSize)

max-inline-size

§

MaxWidth(MaxSize)

max-width

§

BorderBottomLeftRadius(Box<BorderCornerRadius>)

border-bottom-left-radius

§

BorderBottomRightRadius(Box<BorderCornerRadius>)

border-bottom-right-radius

§

BorderEndEndRadius(Box<BorderCornerRadius>)

border-end-end-radius

§

BorderEndStartRadius(Box<BorderCornerRadius>)

border-end-start-radius

§

BorderStartEndRadius(Box<BorderCornerRadius>)

border-start-end-radius

§

BorderStartStartRadius(Box<BorderCornerRadius>)

border-start-start-radius

§

BorderTopLeftRadius(Box<BorderCornerRadius>)

border-top-left-radius

§

BorderTopRightRadius(Box<BorderCornerRadius>)

border-top-right-radius

§

PaddingBlockEnd(NonNegativeLengthPercentage)

padding-block-end

§

PaddingBlockStart(NonNegativeLengthPercentage)

padding-block-start

§

PaddingBottom(NonNegativeLengthPercentage)

padding-bottom

§

PaddingInlineEnd(NonNegativeLengthPercentage)

padding-inline-end

§

PaddingInlineStart(NonNegativeLengthPercentage)

padding-inline-start

§

PaddingLeft(NonNegativeLengthPercentage)

padding-left

§

PaddingRight(NonNegativeLengthPercentage)

padding-right

§

PaddingTop(NonNegativeLengthPercentage)

padding-top

§

BlockSize(Size)

block-size

§

Height(Size)

height

§

InlineSize(Size)

inline-size

§

MinBlockSize(Size)

min-block-size

§

MinHeight(Size)

min-height

§

MinInlineSize(Size)

min-inline-size

§

MinWidth(Size)

min-width

§

Width(Size)

width

§

BorderBlockEndWidth(BorderSideWidth)

border-block-end-width

§

BorderBlockStartWidth(BorderSideWidth)

border-block-start-width

§

BorderBottomWidth(BorderSideWidth)

border-bottom-width

§

BorderInlineEndWidth(BorderSideWidth)

border-inline-end-width

§

BorderInlineStartWidth(BorderSideWidth)

border-inline-start-width

§

BorderLeftWidth(BorderSideWidth)

border-left-width

§

BorderRightWidth(BorderSideWidth)

border-right-width

§

BorderTopWidth(BorderSideWidth)

border-top-width

§

OutlineWidth(BorderSideWidth)

outline-width

§

BackgroundColor(Color)

background-color

§

BorderBlockEndColor(Color)

border-block-end-color

§

BorderBlockStartColor(Color)

border-block-start-color

§

BorderBottomColor(Color)

border-bottom-color

§

BorderInlineEndColor(Color)

border-inline-end-color

§

BorderInlineStartColor(Color)

border-inline-start-color

§

BorderLeftColor(Color)

border-left-color

§

BorderRightColor(Color)

border-right-color

§

BorderTopColor(Color)

border-top-color

§

OutlineColor(Color)

outline-color

§

TextDecorationColor(Color)

text-decoration-color

§

Bottom(LengthPercentageOrAuto)

bottom

§

InsetBlockEnd(LengthPercentageOrAuto)

inset-block-end

§

InsetBlockStart(LengthPercentageOrAuto)

inset-block-start

§

InsetInlineEnd(LengthPercentageOrAuto)

inset-inline-end

§

InsetInlineStart(LengthPercentageOrAuto)

inset-inline-start

§

Left(LengthPercentageOrAuto)

left

§

MarginBlockEnd(LengthPercentageOrAuto)

margin-block-end

§

MarginBlockStart(LengthPercentageOrAuto)

margin-block-start

§

MarginBottom(LengthPercentageOrAuto)

margin-bottom

§

MarginInlineEnd(LengthPercentageOrAuto)

margin-inline-end

§

MarginInlineStart(LengthPercentageOrAuto)

margin-inline-start

§

MarginLeft(LengthPercentageOrAuto)

margin-left

§

MarginRight(LengthPercentageOrAuto)

margin-right

§

MarginTop(LengthPercentageOrAuto)

margin-top

§

Right(LengthPercentageOrAuto)

right

§

Top(LengthPercentageOrAuto)

top

§

CSSWideKeyword(WideKeywordDeclaration)

A CSS-wide keyword.

§

WithVariables(VariableDeclaration)

An unparsed declaration.

§

Custom(CustomDeclaration)

A custom property declaration.

Implementations§

source§

impl PropertyDeclaration

source

pub(crate) unsafe fn unchecked_value_as<T>(&self) -> &T

Returns the given value for this declaration as a particular type. It’s the caller’s responsibility to guarantee that the longhand id has the right specified value representation.

source

pub(crate) fn debug_crash(&self, reason: &str)

Dumps the property declaration before crashing.

source

fn is_longhand_value(&self) -> bool

Returns whether this is a variant of the Longhand(Value) type, rather than one of the special variants in extra_variants.

source

pub fn to_css(&self, dest: &mut CssStringWriter) -> Result

Like the method on ToCss, but without the type parameter to avoid accidentally monomorphizing this large function multiple times for different writers.

source

pub(super) fn color_value(&self) -> Option<&Color>

Returns the color value of a given property, for high-contrast-mode tweaks.

source§

impl PropertyDeclaration

source

pub fn id(&self) -> PropertyDeclarationId<'_>

Given a property declaration, return the property declaration id.

source

pub fn to_physical(&self, wm: WritingMode) -> Self

Given a declaration, convert it into a declaration for a corresponding physical property.

source

pub fn get_system(&self) -> Option<SystemFont>

Returns whether or not the property is set by a system font

source§

impl PropertyDeclaration

source

fn with_variables_from_shorthand(&self, shorthand: ShorthandId) -> Option<&str>

source

pub fn css_wide_keyword(id: LonghandId, keyword: CSSWideKeyword) -> Self

Returns a CSS-wide keyword declaration for a given property.

source

pub fn get_css_wide_keyword(&self) -> Option<CSSWideKeyword>

Returns a CSS-wide keyword if the declaration’s value is one.

source

pub fn may_serialize_as_part_of_shorthand(&self) -> bool

Returns whether the declaration may be serialized as part of a shorthand.

This method returns false if this declaration contains variable or has a CSS-wide keyword value, since these values cannot be serialized as part of a shorthand.

Caller should check with_variables_from_shorthand() and whether all needed declarations has the same CSS-wide keyword first.

Note that, serialization of a shorthand may still fail because of other property-specific requirement even when this method returns true for all the longhand declarations.

source

pub fn is_animatable(&self) -> bool

Returns true if this property declaration is for one of the animatable properties.

source

pub fn is_custom(&self) -> bool

Returns true if this property is a custom property, false otherwise.

source

pub fn parse_into<'i, 't>( declarations: &mut SourcePropertyDeclaration, id: PropertyId, context: &ParserContext<'_>, input: &mut Parser<'i, 't> ) -> Result<(), ParseError<'i>>

The context parameter controls this:

https://drafts.csswg.org/css-animations/#keyframes

The inside of accepts any CSS property except those defined in this specification, but does accept the animation-play-state property and interprets it specially.

This will not actually parse Importance values, and will always set things to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser, we only set them here so that we don’t have to reallocate

Trait Implementations§

source§

impl Clone for PropertyDeclaration

source§

fn clone(&self) -> Self

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 Debug for PropertyDeclaration

source§

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

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

impl MallocSizeOf for PropertyDeclaration

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 PartialEq for PropertyDeclaration

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToShmem for PropertyDeclaration

source§

fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> Result<Self>

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T