Trait 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 does not guarantee pointers to Zero Sized Types (https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts). In case the type is empty this trait will return a NULL pointer, which should be handled in C.
Required Associated Types§
type Target
Required Methods§
Implementations on Foreign Types§
Implementors§
§impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::XOnlyPublicKey
impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::XOnlyPublicKey
type Target = XOnlyPublicKey
§impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::ecdsa::RecoverableSignature
impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::ecdsa::RecoverableSignature
type Target = RecoverableSignature
§impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::ellswift::ElligatorSwift
impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::ellswift::ElligatorSwift
§impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::PublicKey
impl CPtr for breez_sdk_liquid::lightning_125::bitcoin::secp256k1::PublicKey
This trait enables interaction with the FFI layer and even though it is part of the public API normal users should never need to directly interact with FFI types.