render_stability_since_raw_with_extra in rustdoc::html::render - Rust
Description: Writes a span containing the versions at which an item became stable and/or const-stable. For example, if the item became stable at 1.0.0, and const-stable at 1.45.0, this function would write a span containing “1.0.0 (const: 1.45.0)”.

Skip to main content

## render_stability_since_raw_with_extra

# Function render_stability_since_raw_with_extra

Source

    fn render_stability_since_raw_with_extra(
        stable_version: Option<StableSince>,
        const_stability: Option<ConstStability>,
        extra_class: &str,
    ) -> Option<impl Display>

Expand description

Writes a span containing the versions at which an item became stable and/or const-stable. For example, if the item became stable at 1.0.0, and const-stable at 1.45.0, this function would write a span containing “1.0.0 (const: 1.45.0)”.

Returns `None` if there is no stability annotation to be rendered.

Stability and const-stability are considered separately. If the item is unstable, no version will be written. If the item is const-unstable, “const: unstable” will be appended to the span, with a link to the tracking issue if present. If an item’s stability or const-stability version matches the version of its enclosing item, that version will be omitted.

Note that it is possible for an unstable function to be const-stable. In that case, the span will include the const-stable version, but no stable version will be emitted, as a natural consequence of the above rules.