Skip to main content

Module stability

Module stability 

Source
Expand description

API stability markers for OxiPhysics.

This module provides types and traits to document the stability level of public APIs. Consumers can query stability at runtime via the HasStability trait, and library authors annotate items with the marker structs (Stable, Unstable, Experimental, Deprecated) in documentation or associated types.

§Stability Policy

LevelGuarantee
StableFollows semver strictly. Breaking changes only in major versions.
UnstableMay change in minor versions with a deprecation notice.
ExperimentalMay change or be removed at any time without notice.
DeprecatedScheduled for removal in a future version.

§Example

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

struct MyApi;

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

assert_eq!(MyApi::stability(), StabilityLevel::Stable);
assert_eq!(MyApi::stability().to_string(), "stable");

Structs§

Deprecated
Marker type for deprecated APIs.
Experimental
Marker type for experimental APIs.
StabilityParseError
Error returned when parsing an invalid stability level string.
Stable
Marker type for stable APIs.
Unstable
Marker type for unstable APIs.

Enums§

StabilityLevel
Runtime-queryable API stability level.

Traits§

HasStability
Trait for types that declare their API stability level.

Functions§

msrv
Returns the minimum supported Rust version (MSRV) for OxiPhysics.
stability_policy_summary
Returns a summary of the stability policy as a static string slice.
version
Returns the version of the oxiphysics-core crate at build time.