pub struct ComputedValues {
    inner: ComputedValuesInner,
    pseudo: Option<PseudoElement>,
}
Expand description

The struct that Servo uses to represent computed values.

This struct contains an immutable atomically-reference-counted pointer to every kind of style struct.

When needed, the structs may be copied in order to get mutated.

Fields§

§inner: ComputedValuesInner

The actual computed values

In Gecko the outer ComputedValues is actually a ComputedStyle, whereas ComputedValuesInner is the core set of computed values.

We maintain this distinction in servo to reduce the amount of special casing.

§pseudo: Option<PseudoElement>

The pseudo-element that we’re using.

Implementations§

source§

impl ComputedValues

source

pub fn pseudo(&self) -> Option<&PseudoElement>

Returns the pseudo-element that this style represents.

source

pub fn is_pseudo_style(&self) -> bool

Returns true if this is the style for a pseudo-element.

source

pub fn is_display_contents(&self) -> bool

Returns whether this style’s display value is equal to contents.

source

pub fn rules(&self) -> &StrongRuleNode

Gets a reference to the rule node. Panic if no rule node exists.

source

pub fn visited_rules(&self) -> Option<&StrongRuleNode>

Returns the visited rules, if applicable.

source

pub fn custom_properties(&self) -> &ComputedCustomProperties

Gets a reference to the custom properties map (if one exists).

source

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

Returns whether we have the same custom properties as another style.

source

pub fn clone_align_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_align_items(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_align_self(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_aspect_ratio(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_backface_visibility(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_baseline_source(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_collapse(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_repeat(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_box_sizing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_caption_side(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_clear(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_count(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_span(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_container_type(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_display(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_empty_cells(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_wrap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_float(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_language_override(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_stretch(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_variant_caps(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_weight(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_image_rendering(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_justify_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_position(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_type(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_mix_blend_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_opacity(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_order(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_wrap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_pointer_events(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_position(&self) -> T

Gets the computed value of a given property.

source

pub fn clone__servo_overflow_clip_box(&self) -> T

Gets the computed value of a given property.

source

pub fn clone__servo_top_layer(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_table_layout(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_align(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_align_last(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_decoration_line(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_decoration_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_justify(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_rendering(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_transform(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_unicode_bidi(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_visibility(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_white_space(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_word_break(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_writing_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_z_index(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_grow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_shrink(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_x(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_y(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_composition(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_delay(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_duration(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_fill_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_iteration_count(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_name(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_play_state(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_timeline(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_timing_function(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_attachment(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_clip(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_image(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_position_x(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_position_y(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_repeat(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_outset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_slice(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_box_shadow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_clip(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_gap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_container_name(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_counter_increment(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_counter_reset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_cursor(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_filter(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_basis(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_family(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_letter_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_line_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_offset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_perspective(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_perspective_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_quotes(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_rotate(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_scale(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_indent(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_overflow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_shadow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_behavior(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_delay(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_duration(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_property(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_timing_function(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_translate(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_vertical_align(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_word_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone__x_lang(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_source(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_image(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_left_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_right_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_left_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_right_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_top(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_decoration_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_top(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_top(&self) -> T

Gets the computed value of a given property.

source

pub fn computed_or_resolved_value( &self, property_id: LonghandId, context: Option<&Context<'_>>, dest: &mut CssStringWriter ) -> Result

Writes the (resolved or computed) value of the given longhand as a string in dest.

TODO(emilio): We should move all the special resolution from nsComputedDOMStyle to ToResolvedValue instead.

source

pub fn computed_or_resolved_declaration( &self, property_id: LonghandId, context: Option<&Context<'_>> ) -> PropertyDeclaration

Returns the given longhand’s resolved value as a property declaration.

source

pub fn resolve_color(&self, color: Color) -> AbsoluteColor

Resolves the currentColor keyword.

Any color value from computed values (except for the ‘color’ property itself) should go through this method.

Usage example: let top_color = style.resolve_color(style.get_border().clone_border_top_color());

source

pub fn transition_properties<'a>(&'a self) -> TransitionPropertyIterator<'a>

Create a TransitionPropertyIterator for this styles transition properties.

source§

impl ComputedValues

source

pub fn new( pseudo: Option<&PseudoElement>, custom_properties: ComputedCustomProperties, writing_mode: WritingMode, effective_zoom: Zoom, flags: ComputedValueFlags, rules: Option<StrongRuleNode>, visited_style: Option<Arc<ComputedValues>>, background: Arc<Background>, border: Arc<Border>, box_: Arc<Box>, column: Arc<Column>, counters: Arc<Counters>, effects: Arc<Effects>, font: Arc<Font>, inherited_box: Arc<InheritedBox>, inherited_table: Arc<InheritedTable>, inherited_text: Arc<InheritedText>, inherited_ui: Arc<InheritedUI>, list: Arc<List>, margin: Arc<Margin>, outline: Arc<Outline>, padding: Arc<Padding>, position: Arc<Position>, table: Arc<Table>, text: Arc<Text>, ui: Arc<UI> ) -> Arc<Self>

Create a new refcounted ComputedValues

source

pub fn initial_values() -> &'static Self

Get the initial computed values.

source

pub fn to_arc(&self) -> Arc<Self>

Converts the computed values to an Arc<> from a reference.

source

pub fn computed_value_to_string( &self, property: PropertyDeclarationId<'_> ) -> String

Serializes the computed value of this property as a string.

Methods from Deref<Target = ComputedValuesInner>§

source

pub fn visited_style(&self) -> Option<&ComputedValues>

Returns the visited style, if any.

source

pub fn clone_background(&self) -> Arc<Background>

Clone the Background struct.

source

pub fn get_background(&self) -> &Background

Get a immutable reference to the Background struct.

source

pub fn mutate_background(&mut self) -> &mut Background

Get a mutable reference to the Background struct.

source

pub fn clone_border(&self) -> Arc<Border>

Clone the Border struct.

source

pub fn get_border(&self) -> &Border

Get a immutable reference to the Border struct.

source

pub fn mutate_border(&mut self) -> &mut Border

Get a mutable reference to the Border struct.

source

pub fn clone_box(&self) -> Arc<Box>

Clone the Box struct.

source

pub fn get_box(&self) -> &Box

Get a immutable reference to the Box struct.

source

pub fn mutate_box(&mut self) -> &mut Box

Get a mutable reference to the Box struct.

source

pub fn clone_column(&self) -> Arc<Column>

Clone the Column struct.

source

pub fn get_column(&self) -> &Column

Get a immutable reference to the Column struct.

source

pub fn mutate_column(&mut self) -> &mut Column

Get a mutable reference to the Column struct.

source

pub fn clone_counters(&self) -> Arc<Counters>

Clone the Counters struct.

source

pub fn get_counters(&self) -> &Counters

Get a immutable reference to the Counters struct.

source

pub fn mutate_counters(&mut self) -> &mut Counters

Get a mutable reference to the Counters struct.

source

pub fn clone_effects(&self) -> Arc<Effects>

Clone the Effects struct.

source

pub fn get_effects(&self) -> &Effects

Get a immutable reference to the Effects struct.

source

pub fn mutate_effects(&mut self) -> &mut Effects

Get a mutable reference to the Effects struct.

source

pub fn clone_font(&self) -> Arc<Font>

Clone the Font struct.

source

pub fn get_font(&self) -> &Font

Get a immutable reference to the Font struct.

source

pub fn mutate_font(&mut self) -> &mut Font

Get a mutable reference to the Font struct.

source

pub fn clone_inherited_box(&self) -> Arc<InheritedBox>

Clone the InheritedBox struct.

source

pub fn get_inherited_box(&self) -> &InheritedBox

Get a immutable reference to the InheritedBox struct.

source

pub fn mutate_inherited_box(&mut self) -> &mut InheritedBox

Get a mutable reference to the InheritedBox struct.

source

pub fn clone_inherited_table(&self) -> Arc<InheritedTable>

Clone the InheritedTable struct.

source

pub fn get_inherited_table(&self) -> &InheritedTable

Get a immutable reference to the InheritedTable struct.

source

pub fn mutate_inherited_table(&mut self) -> &mut InheritedTable

Get a mutable reference to the InheritedTable struct.

source

pub fn clone_inherited_text(&self) -> Arc<InheritedText>

Clone the InheritedText struct.

source

pub fn get_inherited_text(&self) -> &InheritedText

Get a immutable reference to the InheritedText struct.

source

pub fn mutate_inherited_text(&mut self) -> &mut InheritedText

Get a mutable reference to the InheritedText struct.

source

pub fn clone_inherited_ui(&self) -> Arc<InheritedUI>

Clone the InheritedUI struct.

source

pub fn get_inherited_ui(&self) -> &InheritedUI

Get a immutable reference to the InheritedUI struct.

source

pub fn mutate_inherited_ui(&mut self) -> &mut InheritedUI

Get a mutable reference to the InheritedUI struct.

source

pub fn clone_list(&self) -> Arc<List>

Clone the List struct.

source

pub fn get_list(&self) -> &List

Get a immutable reference to the List struct.

source

pub fn mutate_list(&mut self) -> &mut List

Get a mutable reference to the List struct.

source

pub fn clone_margin(&self) -> Arc<Margin>

Clone the Margin struct.

source

pub fn get_margin(&self) -> &Margin

Get a immutable reference to the Margin struct.

source

pub fn mutate_margin(&mut self) -> &mut Margin

Get a mutable reference to the Margin struct.

source

pub fn clone_outline(&self) -> Arc<Outline>

Clone the Outline struct.

source

pub fn get_outline(&self) -> &Outline

Get a immutable reference to the Outline struct.

source

pub fn mutate_outline(&mut self) -> &mut Outline

Get a mutable reference to the Outline struct.

source

pub fn clone_padding(&self) -> Arc<Padding>

Clone the Padding struct.

source

pub fn get_padding(&self) -> &Padding

Get a immutable reference to the Padding struct.

source

pub fn mutate_padding(&mut self) -> &mut Padding

Get a mutable reference to the Padding struct.

source

pub fn clone_position(&self) -> Arc<Position>

Clone the Position struct.

source

pub fn get_position(&self) -> &Position

Get a immutable reference to the Position struct.

source

pub fn mutate_position(&mut self) -> &mut Position

Get a mutable reference to the Position struct.

source

pub fn clone_table(&self) -> Arc<Table>

Clone the Table struct.

source

pub fn get_table(&self) -> &Table

Get a immutable reference to the Table struct.

source

pub fn mutate_table(&mut self) -> &mut Table

Get a mutable reference to the Table struct.

source

pub fn clone_text(&self) -> Arc<Text>

Clone the Text struct.

source

pub fn get_text(&self) -> &Text

Get a immutable reference to the Text struct.

source

pub fn mutate_text(&mut self) -> &mut Text

Get a mutable reference to the Text struct.

source

pub fn clone_ui(&self) -> Arc<UI>

Clone the UI struct.

source

pub fn get_ui(&self) -> &UI

Get a immutable reference to the UI struct.

source

pub fn mutate_ui(&mut self) -> &mut UI

Get a mutable reference to the UI struct.

source

pub fn rules(&self) -> &StrongRuleNode

Gets a reference to the rule node. Panic if no rule node exists.

source

pub fn ineffective_content_property(&self) -> bool

Returns whether the “content” property for the given style is completely ineffective, and would yield an empty ::before or ::after pseudo-element.

source

pub fn can_be_fragmented(&self) -> bool

Whether the current style or any of its ancestors is multicolumn.

source

pub fn is_multicol(&self) -> bool

Whether the current style is multicolumn.

source

pub fn content_inline_size(&self) -> &Size

Get the logical computed inline size.

source

pub fn content_block_size(&self) -> &Size

Get the logical computed block size.

source

pub fn min_inline_size(&self) -> &Size

Get the logical computed min inline size.

source

pub fn min_block_size(&self) -> &Size

Get the logical computed min block size.

source

pub fn max_inline_size(&self) -> &MaxSize

Get the logical computed max inline size.

source

pub fn max_block_size(&self) -> &MaxSize

Get the logical computed max block size.

source

pub fn logical_padding(&self) -> LogicalMargin<&LengthPercentage>

Get the logical computed padding for this writing mode.

source

pub fn border_width_for_writing_mode( &self, writing_mode: WritingMode ) -> LogicalMargin<Au>

Get the logical border width

source

pub fn logical_border_width(&self) -> LogicalMargin<Au>

Gets the logical computed border widths for this style.

source

pub fn logical_margin(&self) -> LogicalMargin<&LengthPercentageOrAuto>

Gets the logical computed margin from this style.

source

pub fn logical_position(&self) -> LogicalMargin<&LengthPercentageOrAuto>

Gets the logical position from this style.

source

pub fn overrides_transform_style(&self) -> bool

Return true if the effects force the transform style to be Flat

source

pub fn get_used_transform_style(&self) -> T

source

pub fn transform_requires_layer(&self) -> bool

Whether given this transform value, the compositor would require a layer.

Trait Implementations§

source§

impl Clone for ComputedValues

source§

fn clone(&self) -> ComputedValues

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 ComputedValues

source§

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

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

impl Deref for ComputedValues

§

type Target = ComputedValuesInner

The resulting type after dereferencing.
source§

fn deref(&self) -> &ComputedValuesInner

Dereferences the value.
source§

impl DerefMut for ComputedValues

source§

fn deref_mut(&mut self) -> &mut ComputedValuesInner

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, Global>> for T

source§

fn maybe_boxed(self) -> Box<T, Global>

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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere 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 Twhere 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 Twhere 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> Erased for T

source§

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

source§

impl<T> MaybeSendSync for T