Struct ntex_io::IoBoxed

source ·
pub struct IoBoxed(_);
Expand description

Boxed Io object with erased filter type

Methods from Deref<Target = Io<Sealed>>§

Set memory pool

Set io disconnect timeout in millis

Get instance of IoRef

Get referece to a filter

Read incoming io stream and decode codec item.

Wait until read becomes ready.

Pause read task

Encode item, send to a peer

Wake write task and instruct to flush data.

This is async version of .poll_flush() method.

Gracefully shutdown io stream

Polls for read readiness.

If the io stream is not currently ready for reading, this method will store a clone of the Waker from the provided Context. When the io stream becomes ready for reading, Waker::wake will be called on the waker.

Return value The function returns:

Poll::Pending if the io stream is not ready for reading. Poll::Ready(Ok(Some(())))) if the io stream is ready for reading. Poll::Ready(Ok(None)) if io stream is disconnected Some(Poll::Ready(Err(e))) if an error is encountered.

Decode codec item from incoming bytes stream.

Wake read task and request to read more data if data is not enough for decoding. If error get returned this method does not register waker for later wake up action.

Wake write task and instruct to flush data.

If full is true then wake up dispatcher when all data is flushed otherwise wake up when size of write buffer is lower than buffer max size.

Gracefully shutdown io stream

Wait for status updates

Methods from Deref<Target = IoRef>§

Get memory pool

Check if io stream is closed

Wake dispatcher task

Gracefully close connection

Notify dispatcher and initiate io stream shutdown process.

Force close connection

Dispatcher does not wait for uncompleted responses. Io stream get terminated without any graceful period.

Gracefully shutdown io stream

Query filter specific data

Encode and write item to a buffer and wake up write task

Attempts to decode a frame from the read buffer

Write bytes to a buffer and wake up write task

Get mut access to write buffer

Get mut access to read buffer

Start keep-alive timer

Stop keep-alive timer

Notify when io stream get disconnected

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.