waterkit-core 0.1.2

Shared primitives for waterkit (reactive Subscribed, units, identifiers, time)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Capability-probe pattern.
//!
//! Every capability crate exposes a `Capabilities` struct describing what
//! the platform supports (e.g. `BiometricCapabilities`,
//! `SensorCapabilities`). This trait is the lowest common denominator —
//! a single `available` bit so generic code can ask "is this capability
//! present at all?" without knowing the rich shape.

/// Lowest common denominator across capability-probe structs.
pub trait Capabilities {
    /// Returns `true` if the capability is available on this platform at
    /// runtime. Equivalent to the legacy `is_available()` helper.
    fn available(&self) -> bool;
}