Skip to main content

spawn_writer_task

Function spawn_writer_task 

Source
pub fn spawn_writer_task<W>(
    writer: W,
    config: WriterConfig,
) -> (WriterHandle, JoinHandle<Result<()>>)
where W: AsyncWrite + Unpin + Send + 'static,
Expand description

Spawn the writer task and return a handle for sending frames.

§Arguments

  • writer - The async writer (pipe write half)
  • config - Writer configuration

§Returns

A tuple of (WriterHandle, JoinHandle) where the JoinHandle can be used to wait for the writer task to complete.