Skip to main content

HostBackend

Trait HostBackend 

Source
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§

Source

fn info(&self) -> &HostBackendInfo

Stable backend metadata.

Source

fn enumerate(&self) -> Result<HostDeviceInventory>

Enumerates available devices and ports without opening hardware streams.

Source

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".

Implementors§