pub unsafe trait Context: Sealed {
const FLAGS: c_uint;
const DESCRIPTION: &'static str;
unsafe fn deallocate(ptr: *mut u8, size: usize);
}
Expand description
A trait for all kinds of contexts that lets you define the exact flags and a function to deallocate memory. It isn’t possible to implement this for types outside this crate.
Associated Constants
const DESCRIPTION: &'static str
const DESCRIPTION: &'static str
A constant description of the context.
Required methods
unsafe fn deallocate(ptr: *mut u8, size: usize)
unsafe fn deallocate(ptr: *mut u8, size: usize)
A function to deallocate the memory when the context is dropped.
Implementors
sourceimpl Context for VerifyOnly
This is supported on crate features std
or alloc
only.
impl Context for VerifyOnly
This is supported on crate features
std
or alloc
only.