pub struct DeviceProfile {
pub device: Symbol,
pub streams: Vec<Symbol>,
pub inputs: Vec<Symbol>,
pub outputs: Vec<Symbol>,
pub sample_kinds: Vec<Symbol>,
}Expand description
Stream-facing profile advertised by a concrete device.
Fields§
§device: SymbolStable device identity.
streams: Vec<Symbol>Sample streams this device can emit.
inputs: Vec<Symbol>Input controls accepted by the device.
outputs: Vec<Symbol>Output actuators exposed by the device.
sample_kinds: Vec<Symbol>Sample kinds the provider may return from DeviceSession::poll.
Implementations§
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub fn new(
device: Symbol,
streams: Vec<Symbol>,
inputs: Vec<Symbol>,
outputs: Vec<Symbol>,
sample_kinds: Vec<Symbol>,
) -> Self
pub fn new( device: Symbol, streams: Vec<Symbol>, inputs: Vec<Symbol>, outputs: Vec<Symbol>, sample_kinds: Vec<Symbol>, ) -> Self
Builds a device profile from stable stream-facing metadata.
Sourcepub fn modeled_edge() -> Self
pub fn modeled_edge() -> Self
Builds the deterministic modeled edge profile used by tests and docs.
Sourcepub fn supports_sample_kind(&self, sample_kind: &Symbol) -> bool
pub fn supports_sample_kind(&self, sample_kind: &Symbol) -> bool
Returns whether this profile advertises sample_kind.
Trait Implementations§
Source§impl Clone for DeviceProfile
impl Clone for DeviceProfile
Source§fn clone(&self) -> DeviceProfile
fn clone(&self) -> DeviceProfile
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 DeviceProfile
impl Debug for DeviceProfile
impl Eq for DeviceProfile
Source§impl PartialEq for DeviceProfile
impl PartialEq for DeviceProfile
impl StructuralPartialEq for DeviceProfile
Auto Trait Implementations§
impl Freeze for DeviceProfile
impl RefUnwindSafe for DeviceProfile
impl Send for DeviceProfile
impl Sync for DeviceProfile
impl Unpin for DeviceProfile
impl UnsafeUnpin for DeviceProfile
impl UnwindSafe for DeviceProfile
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