Struct kaspa_wasm::TransactionOutput
source · pub struct TransactionOutput {
pub value: u64,
pub script_public_key: ScriptPublicKey,
}
Expand description
Represents a Kaspad transaction output
Fields§
§value: u64
§script_public_key: ScriptPublicKey
Implementations§
source§impl TransactionOutput
impl TransactionOutput
pub fn new(value: u64, script_public_key: ScriptPublicKey) -> TransactionOutput
Trait Implementations§
source§impl BorshDeserialize for TransactionOutputwhere
u64: BorshDeserialize,
ScriptPublicKey: BorshDeserialize,
impl BorshDeserialize for TransactionOutputwhere
u64: BorshDeserialize,
ScriptPublicKey: BorshDeserialize,
source§fn deserialize(buf: &mut &[u8]) -> Result<TransactionOutput, Error>
fn deserialize(buf: &mut &[u8]) -> Result<TransactionOutput, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§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.
source§impl BorshSchema for TransactionOutputwhere
u64: BorshSchema,
ScriptPublicKey: BorshSchema,
impl BorshSchema for TransactionOutputwhere
u64: BorshSchema,
ScriptPublicKey: BorshSchema,
source§fn declaration() -> String
fn declaration() -> String
Get the name of the type without brackets.
source§fn add_definitions_recursively(definitions: &mut HashMap<String, Definition>)
fn add_definitions_recursively(definitions: &mut HashMap<String, Definition>)
Recursively, using DFS, add type definitions required for this type. For primitive types
this is an empty map. Type definition explains how to serialize/deserialize a type.
§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for TransactionOutputwhere
u64: BorshSerialize,
ScriptPublicKey: BorshSerialize,
impl BorshSerialize for TransactionOutputwhere
u64: BorshSerialize,
ScriptPublicKey: BorshSerialize,
source§impl Clone for TransactionOutput
impl Clone for TransactionOutput
source§fn clone(&self) -> TransactionOutput
fn clone(&self) -> TransactionOutput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransactionOutput
impl Debug for TransactionOutput
source§impl<'de> Deserialize<'de> for TransactionOutput
impl<'de> Deserialize<'de> for TransactionOutput
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&TransactionOutput> for TransactionOutput
impl From<&TransactionOutput> for TransactionOutput
source§fn from(output: &TransactionOutput) -> TransactionOutput
fn from(output: &TransactionOutput) -> TransactionOutput
Converts to this type from the input type.
source§impl From<TransactionOutput> for TransactionOutput
impl From<TransactionOutput> for TransactionOutput
source§fn from(output: TransactionOutput) -> TransactionOutput
fn from(output: TransactionOutput) -> TransactionOutput
Converts to this type from the input type.
source§impl PartialEq for TransactionOutput
impl PartialEq for TransactionOutput
source§fn eq(&self, other: &TransactionOutput) -> bool
fn eq(&self, other: &TransactionOutput) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TransactionOutput
impl Serialize for TransactionOutput
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<&RpcTransactionOutput> for TransactionOutput
impl TryFrom<&RpcTransactionOutput> for TransactionOutput
source§fn try_from(item: &RpcTransactionOutput) -> Result<TransactionOutput, RpcError>
fn try_from(item: &RpcTransactionOutput) -> Result<TransactionOutput, RpcError>
Performs the conversion.
impl Eq for TransactionOutput
impl StructuralEq for TransactionOutput
impl StructuralPartialEq for TransactionOutput
Auto Trait Implementations§
impl RefUnwindSafe for TransactionOutput
impl Send for TransactionOutput
impl Sync for TransactionOutput
impl Unpin for TransactionOutput
impl UnwindSafe for TransactionOutput
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.