Trait breez_sdk_core::bitcoin::util::key::secp256k1::ffi::CPtr

pub trait CPtr {
    type Target;

    // Required methods
    fn as_c_ptr(&self) -> *const Self::Target;
    fn as_mut_c_ptr(&mut self) -> *mut Self::Target;
}
Expand description

A trait for producing pointers that will always be valid in C. (assuming NULL pointer is a valid no-op) Rust doesn’t promise what pointers does it give to ZST (https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) In case the type is empty this trait will give a NULL pointer, which should be handled in C.

Required Associated Types§

type Target

Required Methods§

fn as_c_ptr(&self) -> *const Self::Target

fn as_mut_c_ptr(&mut self) -> *mut Self::Target

Implementations on Foreign Types§

§

impl<T> CPtr for [T]

§

type Target = T

§

fn as_c_ptr(&self) -> *const <[T] as CPtr>::Target

§

fn as_mut_c_ptr(&mut self) -> *mut <[T] as CPtr>::Target

Implementors§

§

impl CPtr for breez_sdk_core::bitcoin::XOnlyPublicKey

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ecdsa::RecoverableSignature

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ecdsa::Signature

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::schnorr::Signature

§

type Target = u8

§

impl CPtr for Message

§

type Target = u8

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::PublicKey

§

impl CPtr for SecretKey

§

type Target = u8

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ffi::recovery::RecoverableSignature

§

type Target = u8

§

impl CPtr for KeyPair

§

type Target = u8

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ffi::PublicKey

§

type Target = u8

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ffi::Signature

§

type Target = u8

§

impl CPtr for breez_sdk_core::bitcoin::util::key::secp256k1::ffi::XOnlyPublicKey

§

type Target = u8