pub trait DeviceSample: Sized {
// Required methods
fn sample_kind() -> &'static str;
fn to_expr(&self) -> Expr;
fn from_expr(expr: &Expr) -> DeviceResult<Self>;
}Expand description
Device sample expression contract used by session polling helpers.
Required Methods§
Sourcefn sample_kind() -> &'static str
fn sample_kind() -> &'static str
Stable bare sample kind, such as device-caps.
Sourcefn from_expr(expr: &Expr) -> DeviceResult<Self>
fn from_expr(expr: &Expr) -> DeviceResult<Self>
Decodes the sample from its expression form.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".