Skip to main content

HasStability

Trait HasStability 

Source
pub trait HasStability {
    // Required method
    fn stability() -> StabilityLevel;

    // Provided methods
    fn is_production_ready() -> bool { ... }
    fn may_change() -> bool { ... }
}
Expand description

Trait for types that declare their API stability level.

Implement this on public API entry-point types so consumers can programmatically query how stable an API is.

use oxiphysics_core::stability::{StabilityLevel, HasStability};

struct RigidBodySolver;

impl HasStability for RigidBodySolver {
    fn stability() -> StabilityLevel {
        StabilityLevel::Stable
    }
}

Required Methods§

Source

fn stability() -> StabilityLevel

Returns the stability level of this API.

Provided Methods§

Source

fn is_production_ready() -> bool

Returns true if this API is production-ready.

Source

fn may_change() -> bool

Returns true if this API may change without a major version bump.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§