Skip to main content

HostStreamDriver

Trait HostStreamDriver 

Source
pub trait HostStreamDriver {
    // Required method
    fn shutdown(&self) -> Result<()>;
}
Expand description

Native or external stream resource attached to an opened host stream.

Implementations own platform resources that must outlive the SIM-side queue. Closing or canceling the host stream calls HostStreamDriver::shutdown; dropping the driver should also release the underlying resource.

The trait is intentionally thread-affinity-neutral because some platform stream handles cannot be sent or shared across threads.

Required Methods§

Source

fn shutdown(&self) -> Result<()>

Stops the external stream resource.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§