TraitObjectSyntax in rustc_ast::ast - Rust (original) (raw)

Enum TraitObjectSyntax

Source


#[repr(u8)]

pub enum TraitObjectSyntax {
    Dyn = 0,
    DynStar = 1,
    None = 2,
}

Expand description

Syntax used to declare a trait object.

§

§

§

Source§

Source§

Source§

Source§

Source§

Source§

Source§

Source§

Source§

Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

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

Source§

SAFETY: TraitObjectSyntax only has 3 data-less variants which means it can be represented with a u2. We use repr(u8) to guarantee the discriminants of the variants are no greater than 3.

Source§

Number of least-significant bits in the return value of into_usizewhich may be non-zero. In other words this is the bit width of the value.

Source§

Turns this tag into an integer. Read more

Source§

Source§

Source§

§

§

§

§

§

§

§

§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 1 byte

Size for each variant: