Skip to main content

Handle

Trait Handle 

Source
pub trait Handle {
    // Provided methods
    fn query(&self, _: TypeId) -> Option<Box<dyn Any>> { ... }
    fn write(&self, _: &IoContext) { ... }
}
Expand description

Control handle for transport-specific I/O tasks.

The handle is called synchronously by the connection state and must not block.

Provided Methods§

Source

fn query(&self, _: TypeId) -> Option<Box<dyn Any>>

Returns type-indexed transport information.

Source

fn write(&self, _: &IoContext)

Requests that the transport start or resume a write operation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Handle for Rc<IoTest>

Source§

fn query(&self, id: TypeId) -> Option<Box<dyn Any>>

Implementors§