pub trait HostBackend: Send + Sync {
// Required methods
fn info(&self) -> &HostBackendInfo;
fn enumerate(&self) -> Result<HostDeviceInventory>;
fn open(&self, request: HostStreamConfigRequest) -> Result<HostOpenStream>;
}Expand description
Backend contract for host-controlled stream devices.
Required Methods§
Sourcefn info(&self) -> &HostBackendInfo
fn info(&self) -> &HostBackendInfo
Stable backend metadata.
Sourcefn enumerate(&self) -> Result<HostDeviceInventory>
fn enumerate(&self) -> Result<HostDeviceInventory>
Enumerates available devices and ports without opening hardware streams.
Sourcefn open(&self, request: HostStreamConfigRequest) -> Result<HostOpenStream>
fn open(&self, request: HostStreamConfigRequest) -> Result<HostOpenStream>
Opens a stream according to the requested host configuration.
This is backend-level dispatch for implementations and already checked
callers. Public host opens should route through
HostBackendRegistry::open_checked
so stream.host authority and device effects are handled before the
backend is reached.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".