[][src]Trait polyfuse::request::Buffer

pub trait Buffer {
    type Data;
    fn header(&self) -> Option<&RequestHeader>;
fn poll_ready(
        self: Pin<&mut Self>,
        cx: &mut Context,
        bufsize: usize
    ) -> Poll<Result<()>>;
fn poll_receive<R: ?Sized>(
        self: Pin<&mut Self>,
        cx: &mut Context,
        reader: Pin<&mut R>
    ) -> Poll<Result<()>>
    where
        R: AsyncRead
;
fn extract(&mut self) -> Result<Request<Self::Data>>; }

Buffer that stores FUSE requests.

Associated Types

type Data

The remaining part of request data.

Loading content...

Required methods

fn header(&self) -> Option<&RequestHeader>

Return a reference to the header part of received request.

fn poll_ready(
    self: Pin<&mut Self>,
    cx: &mut Context,
    bufsize: usize
) -> Poll<Result<()>>

Prepare the buffer to receive the specified amount of data.

fn poll_receive<R: ?Sized>(
    self: Pin<&mut Self>,
    cx: &mut Context,
    reader: Pin<&mut R>
) -> Poll<Result<()>> where
    R: AsyncRead

Transfer one request queued in the kernel driver into this buffer.

fn extract(&mut self) -> Result<Request<Self::Data>>

Extract the content of request from the buffer.

Loading content...

Implementors

impl Buffer for BytesBuffer[src]

type Data = Bytes

Loading content...