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§
Sourcefn stability() -> StabilityLevel
fn stability() -> StabilityLevel
Returns the stability level of this API.
Provided Methods§
Sourcefn is_production_ready() -> bool
fn is_production_ready() -> bool
Returns true if this API is production-ready.
Sourcefn may_change() -> bool
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.