Skip to main content

SubmitMultiFactory

Trait SubmitMultiFactory 

Source
pub trait SubmitMultiFactory {
    type Op: OpCode + TakeBuffer<Buffer = Self::Buffer> + 'static;
    type Buffer: HandleBufferRef + 'static;

    // Required method
    fn create(
        &mut self,
    ) -> Result<SubmitMultiManaged<Self::Op, Self::Buffer>, Error>;
}
Available on crate feature runtime only.
Expand description

Creates managed multishot submissions for SubmitMultiStream.

SubmitMultiStream calls create again when the previous submission ends before EOF.

By default, this trait is implemented for closures FnMut() -> std::io::Result<SubmitMultiManaged<T, B>>.

Required Associated Types§

Source

type Op: OpCode + TakeBuffer<Buffer = Self::Buffer> + 'static

The OpCode type.

Source

type Buffer: HandleBufferRef + 'static

The buffer returned by the OpCode.

This can be BufferRef, RecvFromMultiResult or RecvMsgMultiResult.

Required Methods§

Source

fn create( &mut self, ) -> Result<SubmitMultiManaged<Self::Op, Self::Buffer>, Error>

Creates a new managed multishot submission.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, T, B> SubmitMultiFactory for F
where F: FnMut() -> Result<SubmitMultiManaged<T, B>, Error>, T: OpCode + TakeBuffer<Buffer = B> + 'static, B: HandleBufferRef + 'static,

Source§

type Buffer = B

Source§

type Op = T