Struct simplicity_sys::c_jets::c_env::RawOutputData
source · 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§
Auto Trait Implementations§
impl RefUnwindSafe for RawOutputData
impl Send for RawOutputData
impl Sync for RawOutputData
impl Unpin for RawOutputData
impl UnwindSafe for RawOutputData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more