pub struct Calldata {
pub tx_hash: TxHash,
pub identity: Identity,
pub blobs: IndexedBlobs,
pub tx_blob_count: usize,
pub index: BlobIndex,
pub tx_ctx: Option<TxContext>,
pub private_input: Vec<u8>,
}Expand description
This struct is passed from the application backend to the contract as an input. It contains the data that the contract will use to run the blob’s action on its state.
Fields§
§tx_hash: TxHashTxHash of the BlobTransaction being proved
identity: IdentityUser’s identity used for the BlobTransaction
blobs: IndexedBlobsSubset of Blobs of the BlobTransaction
tx_blob_count: usizeNumber of ALL blobs in the transaction. tx_blob_count >= blobs.len()
index: BlobIndexIndex of the blob corresponding to the contract. The Blob referenced by this index has to be parsed by the contract
tx_ctx: Option<TxContext>Optional additional context of the BlobTransaction
private_input: Vec<u8>Additional input for the contract that is not written on-chain in the BlobTransaction
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for Calldata
impl BorshDeserialize for Calldata
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Calldata
impl BorshSerialize for Calldata
Source§impl<'de> Deserialize<'de> for Calldata
impl<'de> Deserialize<'de> for Calldata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Calldata
impl RefUnwindSafe for Calldata
impl Send for Calldata
impl Sync for Calldata
impl Unpin for Calldata
impl UnsafeUnpin for Calldata
impl UnwindSafe for Calldata
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