pub struct OutputId { /* private fields */ }
Expand description
The identifier of an Output
.
Implementations§
source§impl OutputId
impl OutputId
sourcepub fn new(transaction_id: TransactionId, index: u16) -> Result<OutputId, Error>
pub fn new(transaction_id: TransactionId, index: u16) -> Result<OutputId, Error>
Creates a new OutputId
.
sourcepub fn transaction_id(&self) -> &TransactionId
pub fn transaction_id(&self) -> &TransactionId
Returns the TransactionId
of an OutputId
.
sourcepub fn split(self) -> (TransactionId, u16)
pub fn split(self) -> (TransactionId, u16)
Splits an OutputId
into its TransactionId
and index.
Trait Implementations§
source§impl<'de> Deserialize<'de> for OutputId
impl<'de> Deserialize<'de> for OutputId
source§fn deserialize<D>(
deserializer: D
) -> Result<OutputId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<OutputId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&OutputId> for AliasAddress
impl From<&OutputId> for AliasAddress
source§fn from(output_id: &OutputId) -> AliasAddress
fn from(output_id: &OutputId) -> AliasAddress
Converts to this type from the input type.
source§impl From<&OutputId> for NftAddress
impl From<&OutputId> for NftAddress
source§fn from(output_id: &OutputId) -> NftAddress
fn from(output_id: &OutputId) -> NftAddress
Converts to this type from the input type.
source§impl Ord for OutputId
impl Ord for OutputId
source§impl Packable for OutputId
impl Packable for OutputId
§type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
§type UnpackVisitor = <TransactionId as Packable>::UnpackVisitor
type UnpackVisitor = <TransactionId as Packable>::UnpackVisitor
FIXME: docs
source§fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
Packs this value into the given
Packer
.source§fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<OutputId as Packable>::UnpackVisitor
) -> Result<OutputId, UnpackError<<OutputId as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<OutputId as Packable>::UnpackVisitor
) -> Result<OutputId, UnpackError<<OutputId as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
Unpacks this value from the given
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for OutputId
impl PartialEq for OutputId
source§impl PartialOrd for OutputId
impl PartialOrd for OutputId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for OutputId
impl Serialize for OutputId
source§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for OutputId
impl Eq for OutputId
impl StructuralPartialEq for OutputId
Auto Trait Implementations§
impl Freeze for OutputId
impl RefUnwindSafe for OutputId
impl Send for OutputId
impl Sync for OutputId
impl Unpin for OutputId
impl UnwindSafe for OutputId
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key
and return true
if they are equal.source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
source§fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize
Self
from a serde_json::Value
.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<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
].
source§fn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
] skipping some syntatical checks.
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using
pack
.source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
source§fn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize
self
as a serde_json::Value
.