pub struct StandardData {Show 17 fields
pub amount: Option<CurrencyAmount>,
pub generic_typed_value: Option<GenericTypedValue>,
pub peer_data: Option<PeerMetadata>,
pub node_metadata: Option<NodeMetadata>,
pub dynamic_node_metadata: Option<DynamicNodeMetadata>,
pub height: Option<i64>,
pub data_hash: Option<Hash>,
pub hash: Option<Hash>,
pub observation: Option<Observation>,
pub address: Option<Address>,
pub state: Option<BytesData>,
pub request: Option<BytesData>,
pub standard_request: Option<StandardRequest>,
pub standard_response: Option<StandardResponse>,
pub schema_def: Option<SchemaDef>,
pub data: Option<BytesData>,
pub aggregate_state_hash: Option<Hash>,
}Expand description
Generic data structure designed to hold arbitrary data in a common format. This should be considered supplementary to using a regular schema, not a complete substitute.
Fields§
§amount: Option<CurrencyAmount>Standard currency style field
generic_typed_value: Option<GenericTypedValue>§peer_data: Option<PeerMetadata>Where a peer (representing a person controlling multiple nodes from a cold wallet,) updates it’s metadata within a transaction
node_metadata: Option<NodeMetadata>Where an online or live node programmatically updates it’s own metadata using it’s live hot keys
dynamic_node_metadata: Option<DynamicNodeMetadata>Latest value associated with the online / hot node – updated more frequently and not necessarily tracked in every transaction, but kept here for reference.
height: Option<i64>Equivalent to ‘block height’, linear observation counter
data_hash: Option<Hash>Reference to externally resolved data
hash: Option<Hash>Pure hash reference, without necessarily being backed by any specific data.
observation: Option<Observation>Used for node transactions related to their internal observation formation, equivalent to a ‘local’ block
address: Option<Address>Used for referencing bitcoin address, kept here at top level for convenience
state: Option<BytesData>Used to store state information directly following eUTXO conventions
request: Option<BytesData>Contract style request, similar to Ethereum transaction for updating a smart contract, from an external user
standard_request: Option<StandardRequest>Contract style response, similar to above, but specifically typed to correspond to a ‘default’ schema driven request common to all contracts and available automatically in the SDK.
standard_response: Option<StandardResponse>§schema_def: Option<SchemaDef>Schema definition for the data, used for parsing and validation
data: Option<BytesData>Generic bytes data, used for storing arbitrary data
aggregate_state_hash: Option<Hash>For eUTXO style contracts, the hash of all state information aggregated from initial state origin. Can be re-calculated.
Implementations§
Source§impl StandardData
impl StandardData
Source§impl StandardData
impl StandardData
pub fn observation(o: Observation) -> Self
pub fn empty() -> Self
pub fn peer_data(pd: PeerMetadata) -> Option<Self>
pub fn amount_data(amount: u64) -> Option<Self>
Trait Implementations§
Source§impl Clone for StandardData
impl Clone for StandardData
Source§fn clone(&self) -> StandardData
fn clone(&self) -> StandardData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StandardData
impl Debug for StandardData
Source§impl Default for StandardData
impl Default for StandardData
Source§impl<'de> Deserialize<'de> for StandardData
impl<'de> Deserialize<'de> for StandardData
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>,
Source§impl Hash for StandardData
impl Hash for StandardData
Source§impl Message for StandardData
impl Message for StandardData
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for StandardData
impl PartialEq for StandardData
Source§impl Serialize for StandardData
impl Serialize for StandardData
impl Eq for StandardData
impl StructuralPartialEq for StandardData
Auto Trait Implementations§
impl Freeze for StandardData
impl RefUnwindSafe for StandardData
impl Send for StandardData
impl Sync for StandardData
impl Unpin for StandardData
impl UnwindSafe for StandardData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more