Skip to main content

ResultTakeBuffer

Trait ResultTakeBuffer 

pub trait ResultTakeBuffer {
    type Buffer;

    // Required method
    unsafe fn take_buffer(self) -> Result<Option<Self::Buffer>, Error>;
}
Expand description

Helper trait for taking buffer from a BufResult.

Required Associated Types§

type Buffer

Type of the buffer.

Required Methods§

unsafe fn take_buffer(self) -> Result<Option<Self::Buffer>, Error>

Call SetLen::advance_to if the result is Ok and return the buffer as result.

§Safety

The result value must be a valid length to advance to.

Implementors§