pub trait ResultTakeBuffer {
type Buffer;
// Required method
unsafe fn take_buffer(self) -> Result<Option<Self::Buffer>>;
}Expand description
Helper trait for taking buffer from a BufResult.
Required Associated Types§
Required Methods§
Sourceunsafe fn take_buffer(self) -> Result<Option<Self::Buffer>>
unsafe fn take_buffer(self) -> Result<Option<Self::Buffer>>
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".