pub struct Allocator<'ctx> { /* private fields */ }Expand description
A custom allocator that libghostty uses for its memory allocations.
The allocator may depend on some external state for the
duration of lifetime 'ctx. This is useful for adapting external,
stateful allocators that may not have a 'static lifetime.
One example of a custom allocator that does have a 'static
lifetime is Rust’s own default allocator, which can also be used
within libghostty as Allocator::GLOBAL.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> !Send for Allocator<'ctx>
impl<'ctx> !Sync for Allocator<'ctx>
impl<'ctx> Freeze for Allocator<'ctx>
impl<'ctx> RefUnwindSafe for Allocator<'ctx>
impl<'ctx> Unpin for Allocator<'ctx>
impl<'ctx> UnsafeUnpin for Allocator<'ctx>
impl<'ctx> UnwindSafe for Allocator<'ctx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more