pub struct TransactionOutput { /* private fields */ }Expand description
Represents a Kaspad transaction output @category Consensus
Implementations§
Source§impl TransactionOutput
impl TransactionOutput
pub fn new(value: u64, script_public_key: ScriptPublicKey) -> TransactionOutput
pub fn new_with_inner(inner: TransactionOutputInner) -> Self
pub fn inner(&self) -> MutexGuard<'_, TransactionOutputInner>
pub fn script_public_key_length(&self) -> usize
Source§impl TransactionOutput
impl TransactionOutput
Sourcepub fn ctor(
value: u64,
script_public_key: &ScriptPublicKey,
) -> TransactionOutput
pub fn ctor( value: u64, script_public_key: &ScriptPublicKey, ) -> TransactionOutput
TransactionOutput constructor
pub fn value(&self) -> u64
pub fn set_value(&self, v: u64)
pub fn get_script_public_key(&self) -> ScriptPublicKey
pub fn set_script_public_key(&self, v: &ScriptPublicKey)
Trait Implementations§
Source§impl AsRef<TransactionOutput> for TransactionOutput
impl AsRef<TransactionOutput> for TransactionOutput
Source§fn as_ref(&self) -> &TransactionOutput
fn as_ref(&self) -> &TransactionOutput
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CastFromJs for TransactionOutput
impl CastFromJs for TransactionOutput
Source§fn try_ref_from_js_value<'a, R>(
js: &'a R,
) -> Result<<Self as RefFromWasmAbi>::Anchor, Error>
fn try_ref_from_js_value<'a, R>( js: &'a R, ) -> Result<<Self as RefFromWasmAbi>::Anchor, Error>
Obtain safe reference from
JsValueSource§fn try_long_ref_from_js_value<'a, R>(
js: &'a R,
) -> Result<<Self as RefFromWasmAbi>::Anchor, Error>
fn try_long_ref_from_js_value<'a, R>( js: &'a R, ) -> Result<<Self as RefFromWasmAbi>::Anchor, Error>
Obtain safe long reference from
JsValuefn try_ref_from_js_value_as_cast<'a, R>( js_value: &'a R, ) -> Result<Cast<'a, Self>, Error>
fn try_long_ref_from_js_value_as_cast<'a, R>( js: &'a R, ) -> Result<Cast<'a, Self>, Error>
Source§impl Clone for TransactionOutput
impl Clone for TransactionOutput
Source§fn clone(&self) -> TransactionOutput
fn clone(&self) -> TransactionOutput
Returns a duplicate of the value. Read more
1.0.0§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<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
Source§impl From<&TransactionOutput> for TransactionOutput
impl From<&TransactionOutput> for TransactionOutput
Source§fn from(output: &TransactionOutput) -> Self
fn from(output: &TransactionOutput) -> Self
Converts to this type from the input type.
Source§impl From<&TransactionOutput> for TransactionOutput
impl From<&TransactionOutput> for TransactionOutput
Source§fn from(output: &TransactionOutput) -> Self
fn from(output: &TransactionOutput) -> Self
Converts to this type from the input type.
Source§impl From<TransactionOutput> for JsValue
impl From<TransactionOutput> for JsValue
Source§fn from(value: TransactionOutput) -> Self
fn from(value: TransactionOutput) -> Self
Converts to this type from the input type.
Source§impl From<TransactionOutput> for TransactionOutput
impl From<TransactionOutput> for TransactionOutput
Source§fn from(output: TransactionOutput) -> Self
fn from(output: TransactionOutput) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for TransactionOutput
impl FromWasmAbi for TransactionOutput
Source§impl IntoWasmAbi for TransactionOutput
impl IntoWasmAbi for TransactionOutput
Source§impl RefFromWasmAbi for TransactionOutput
impl RefFromWasmAbi for TransactionOutput
Source§type Anchor = RcRef<TransactionOutput>
type Anchor = RcRef<TransactionOutput>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for TransactionOutput
impl Serialize for TransactionOutput
Source§impl TryCastFromJs for TransactionOutput
impl TryCastFromJs for TransactionOutput
type Error = Error
Source§fn try_cast_from<'a, R>(value: &'a R) -> Result<Cast<'_, Self>, Self::Error>
fn try_cast_from<'a, R>(value: &'a R) -> Result<Cast<'_, Self>, Self::Error>
Try to cast a JsValue into a Rust object.
This should be user-defined function that
attempts to cast a JsValue into a Rust object
or interpret a source data and create a
temporary struct owned by by the
Cast.Source§fn try_owned_from(value: impl AsRef<JsValue>) -> Result<Self, Self::Error>
fn try_owned_from(value: impl AsRef<JsValue>) -> Result<Self, Self::Error>
Perform a user cast and consume the
Cast container.
This function will return a temporary user-created
object created during [try_cast_from] or a clone of the casted reference.fn try_captured_cast_from( js_value: impl AsRef<JsValue>, ) -> Result<Cast<'static, Self>, Self::Error>
Source§fn resolve<'a, R>(
js: &'a R,
create: impl FnOnce() -> Result<Self, Self::Error>,
) -> Result<Cast<'a, Self>, Self::Error>
fn resolve<'a, R>( js: &'a R, create: impl FnOnce() -> Result<Self, Self::Error>, ) -> Result<Cast<'a, Self>, Self::Error>
Try to cast a JsValue into a Rust object, in cast of failure
invoke a user-supplied closure that can try to create an instance
of the object based on the supplied JsValue.
Source§fn resolve_cast<'a, R>(
js: &'a R,
create: impl FnOnce() -> Result<Cast<'a, Self>, Self::Error>,
) -> Result<Cast<'a, Self>, Self::Error>
fn resolve_cast<'a, R>( js: &'a R, create: impl FnOnce() -> Result<Cast<'a, Self>, Self::Error>, ) -> Result<Cast<'a, Self>, Self::Error>
Try to cast a JsValue into a Rust object, in cast of failure
invoke a user-supplied closure that can try to create an instance
of the object based on the supplied JsValue. Unlike the [
resolve]
function, this function expects create closure to return a Cast.
This is useful when routing the creation of the object to another
function that is capable of creating a compatible Cast wrapper.Source§impl TryFromJsValue for TransactionOutput
impl TryFromJsValue for TransactionOutput
Source§impl VectorFromWasmAbi for TransactionOutput
impl VectorFromWasmAbi for TransactionOutput
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[TransactionOutput]>
Source§impl VectorIntoWasmAbi for TransactionOutput
impl VectorIntoWasmAbi for TransactionOutput
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[TransactionOutput]>) -> Self::Abi
Source§impl WasmDescribeVector for TransactionOutput
impl WasmDescribeVector for TransactionOutput
impl SupportsConstructor for TransactionOutput
impl SupportsInstanceProperty for TransactionOutput
impl SupportsStaticProperty for TransactionOutput
Auto Trait Implementations§
impl Freeze for TransactionOutput
impl RefUnwindSafe for TransactionOutput
impl Send for TransactionOutput
impl Sync for TransactionOutput
impl Unpin for TransactionOutput
impl UnwindSafe for TransactionOutput
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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>
Converts
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>
Converts
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 moreSource§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.