pub struct RawOutputData {
    pub asset: Vec<c_uchar>,
    pub value: Vec<c_uchar>,
    pub nonce: Vec<c_uchar>,
    pub surjection_proof: Vec<c_uchar>,
    pub range_proof: Vec<c_uchar>,
}
Expand description

Documentation of CRawInputData/CRawOutputData/CRawTapData/CRaw Data structure for holding data that CTransaction points to.

Why do we this special data structure? 1. We need to keep the data in memory until the CTransaction is dropped. 2. The memory is Transaction is not saved in the same format as required by FFI. We use more ergonomics in rust to allow better UX which interfere with the FFI. For example, the Value is stored as Tagged Union, but we require it to be a slice of bytes in elements format. 3. Allocating inside FFI functions does not work because the memory is freed after the function returns. 4. We only create allocations for data fields that are stored differently from the consensus serialization format.

Fields§

§asset: Vec<c_uchar>§value: Vec<c_uchar>§nonce: Vec<c_uchar>§surjection_proof: Vec<c_uchar>§range_proof: Vec<c_uchar>

Trait Implementations§

source§

impl Debug for RawOutputData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.