pub struct DeviceProfile {
pub kind: Symbol,
pub tier: DeviceTier,
pub display: Vec<Symbol>,
pub input: Vec<Symbol>,
pub output: Vec<Symbol>,
pub links: Vec<Symbol>,
pub streams: Vec<Symbol>,
pub rate: RateClass,
pub policy: Expr,
}Expand description
A typed device envelope derived from SurfaceCaps.
This is capability data, not a concrete device enum. Instances advertise maps; this profile reads them into stable lanes so routing and degradation decisions share one interpretation.
Fields§
§kind: SymbolDevice family token, for example watch, glasses, or desktop.
tier: DeviceTierTier computed by derive_tier.
display: Vec<Symbol>Display capability tokens such as flat, stereo, round, or hud.
input: Vec<Symbol>Input capability tokens such as touch, tap, voice, or crown.
output: Vec<Symbol>Output capability tokens such as screen, haptic, speaker, or hud.
links: Vec<Symbol>Link tokens such as usb, phone-relay, or lan-ws.
streams: Vec<Symbol>Stream tokens such as pose, heart-rate, motion, or battery.
rate: RateClassDeclared timing envelope.
policy: ExprConsent, retention, and redaction hints.
Implementations§
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub fn new(parts: DeviceProfileParts) -> Self
pub fn new(parts: DeviceProfileParts) -> Self
Builds a profile and computes the tier from the advertised fields.
Sourcepub fn from_surface_caps(caps: &SurfaceCaps) -> Self
pub fn from_surface_caps(caps: &SurfaceCaps) -> Self
Derives a device profile from open SurfaceCaps metadata.
Sourcepub fn from_expr(expr: &Expr) -> Result<Self, DeviceProfileError>
pub fn from_expr(expr: &Expr) -> Result<Self, DeviceProfileError>
Parses a device/profile tagged map.
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub fn to_surface_caps(&self, client_id: impl Into<String>) -> SurfaceCaps
pub fn to_surface_caps(&self, client_id: impl Into<String>) -> SurfaceCaps
Converts this profile back into open surface capabilities for client_id.
This is the bridge used by device peers: the device keeps the typed
profile for routing and tier decisions, while the synchronized surface
hub receives ordinary SurfaceCaps and continues to project scenes by
open capability metadata.
Trait Implementations§
Source§impl Clone for DeviceProfile
impl Clone for DeviceProfile
Source§fn clone(&self) -> DeviceProfile
fn clone(&self) -> DeviceProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more