pub enum StabilityLevel {
    Unstable {
        reason: UnstableReason,
        issue: Option<NonZeroU32>,
        is_soft: bool,
        implied_by: Option<Symbol>,
    },
    Stable {
        since: Symbol,
        allowed_through_unstable_modules: bool,
    },
}
Expand description

The available stability levels.

Variants

Unstable

Fields

reason: UnstableReason

Reason for the current stability level.

issue: Option<NonZeroU32>

Relevant rust-lang/rust issue.

is_soft: bool
implied_by: Option<Symbol>

If part of a feature is stabilized and a new feature is added for the remaining parts, then the implied_by attribute is used to indicate which now-stable feature previously contained a item.

#[unstable(feature = "foo", issue = "...")]
fn foo() {}
#[unstable(feature = "foo", issue = "...")]
fn foobar() {}

…becomes…

#[stable(feature = "foo", since = "1.XX.X")]
fn foo() {}
#[unstable(feature = "foobar", issue = "...", implied_by = "foo")]
fn foobar() {}

#[unstable]

Stable

Fields

since: Symbol

Rust release which stabilized this feature.

allowed_through_unstable_modules: bool

Is this item allowed to be referred to on stable, despite being contained in unstable modules?

#[stable]

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

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: 16 bytes

Size for each variant:

  • Unstable: 15 bytes
  • Stable: 7 bytes