pub trait BufferAllocator {
type Buffer<'source>: DerefMut<Target = [MaybeUninit<u8>]>
where Self: 'source;
type Error;
// Required method
fn alloc<'source>(
&'source self,
size: NonZeroUsize,
) -> Result<Self::Buffer<'source>, Self::Error>;
}Required Associated Types§
type Buffer<'source>: DerefMut<Target = [MaybeUninit<u8>]> where Self: 'source
type Error
Required Methods§
fn alloc<'source>( &'source self, size: NonZeroUsize, ) -> Result<Self::Buffer<'source>, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.