pub trait Allocator {
type Buf<'this>: Buf
where Self: 'this;
// Required method
fn alloc(&self) -> Option<Self::Buf<'_>>;
}
Expand description
An allocator that can be used in combination with a context.
See the musli-allocator crate for examples.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.