Trait secp256k1::Context

source ·
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.

Safety

This trait is marked unsafe to allow unsafe implementations of deallocate.

Required Associated Constants§

Flags for the ffi.

A constant description of the context.

Required Methods§

A function to deallocate the memory when the context is dropped.

Safety

ptr must be valid. Further safety constraints may be imposed by std::alloc::dealloc.

Implementors§