pub struct DeviceCaps { /* private fields */ }Expand description
A sample describing a device’s stream-facing capabilities.
DeviceCaps is the base sample every concrete device instance can emit
before it starts producing richer sensor-specific sample kinds.
Implementations§
Source§impl DeviceCaps
impl DeviceCaps
Sourcepub fn new(
seq: u64,
device: Symbol,
streams: Vec<Symbol>,
inputs: Vec<Symbol>,
outputs: Vec<Symbol>,
) -> Self
pub fn new( seq: u64, device: Symbol, streams: Vec<Symbol>, inputs: Vec<Symbol>, outputs: Vec<Symbol>, ) -> Self
Builds a device capabilities sample.
Sourcepub fn demo(seq: u64) -> Self
pub fn demo(seq: u64) -> Self
Builds the deterministic demo capability sample used by tests and docs.
Sourcepub fn to_stream_packet(&self) -> StreamPacket
pub fn to_stream_packet(&self) -> StreamPacket
Wraps this capabilities sample as a stream data packet.
Trait Implementations§
Source§impl Clone for DeviceCaps
impl Clone for DeviceCaps
Source§fn clone(&self) -> DeviceCaps
fn clone(&self) -> DeviceCaps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceCaps
impl Debug for DeviceCaps
Source§impl DeviceSample for DeviceCaps
impl DeviceSample for DeviceCaps
Source§fn sample_kind() -> &'static str
fn sample_kind() -> &'static str
Stable bare sample kind, such as
device-caps.Source§fn from_expr(expr: &Expr) -> DeviceSampleResult<Self>
fn from_expr(expr: &Expr) -> DeviceSampleResult<Self>
Decodes the sample from its expression map.
impl Eq for DeviceCaps
Source§impl PartialEq for DeviceCaps
impl PartialEq for DeviceCaps
impl StructuralPartialEq for DeviceCaps
Auto Trait Implementations§
impl Freeze for DeviceCaps
impl RefUnwindSafe for DeviceCaps
impl Send for DeviceCaps
impl Sync for DeviceCaps
impl Unpin for DeviceCaps
impl UnsafeUnpin for DeviceCaps
impl UnwindSafe for DeviceCaps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more