pub enum ManifestAddress {
Static(NodeId),
Named(ManifestNamedAddress),
}
Expand description
Any address supported by manifest, both global and local.
Must start with a supported entity type byte.
Variants§
Static(NodeId)
Static address, either global or internal, with entity type byte checked.
TODO: prevent direct construction, as in NonFungibleLocalId
Named(ManifestNamedAddress)
Named address, global only at the moment.
Implementations§
Source§impl ManifestAddress
impl ManifestAddress
pub fn named(id: u32) -> ManifestAddress
pub fn into_named(self) -> Option<ManifestNamedAddress>
Trait Implementations§
Source§impl Clone for ManifestAddress
impl Clone for ManifestAddress
Source§fn clone(&self) -> ManifestAddress
fn clone(&self) -> ManifestAddress
Returns a duplicate 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 ManifestAddress
impl Debug for ManifestAddress
Source§impl<D> Decode<ManifestCustomValueKind, D> for ManifestAddresswhere
D: Decoder<ManifestCustomValueKind>,
impl<D> Decode<ManifestCustomValueKind, D> for ManifestAddresswhere
D: Decoder<ManifestCustomValueKind>,
Source§fn decode_body_with_value_kind(
decoder: &mut D,
value_kind: ValueKind<ManifestCustomValueKind>,
) -> Result<ManifestAddress, DecodeError>
fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<ManifestCustomValueKind>, ) -> Result<ManifestAddress, DecodeError>
Decodes the type from the decoder, which should match a preloaded value kind. Read more
Source§impl<E> Encode<ManifestCustomValueKind, E> for ManifestAddresswhere
E: Encoder<ManifestCustomValueKind>,
impl<E> Encode<ManifestCustomValueKind, E> for ManifestAddresswhere
E: Encoder<ManifestCustomValueKind>,
Source§fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
Encodes the SBOR value’s kind to the encoder
Source§fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
Encodes the SBOR body of the type to the encoder. Read more
Source§impl From<ComponentAddress> for ManifestAddress
impl From<ComponentAddress> for ManifestAddress
Source§fn from(value: ComponentAddress) -> ManifestAddress
fn from(value: ComponentAddress) -> ManifestAddress
Converts to this type from the input type.
Source§impl From<GlobalAddress> for ManifestAddress
impl From<GlobalAddress> for ManifestAddress
Source§fn from(value: GlobalAddress) -> ManifestAddress
fn from(value: GlobalAddress) -> ManifestAddress
Converts to this type from the input type.
Source§impl From<InternalAddress> for ManifestAddress
impl From<InternalAddress> for ManifestAddress
Source§fn from(value: InternalAddress) -> ManifestAddress
fn from(value: InternalAddress) -> ManifestAddress
Converts to this type from the input type.
Source§impl From<PackageAddress> for ManifestAddress
impl From<PackageAddress> for ManifestAddress
Source§fn from(value: PackageAddress) -> ManifestAddress
fn from(value: PackageAddress) -> ManifestAddress
Converts to this type from the input type.
Source§impl From<ResourceAddress> for ManifestAddress
impl From<ResourceAddress> for ManifestAddress
Source§fn from(value: ResourceAddress) -> ManifestAddress
fn from(value: ResourceAddress) -> ManifestAddress
Converts to this type from the input type.
Source§impl Hash for ManifestAddress
impl Hash for ManifestAddress
Source§impl Ord for ManifestAddress
impl Ord for ManifestAddress
Source§fn cmp(&self, other: &ManifestAddress) -> Ordering
fn cmp(&self, other: &ManifestAddress) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ManifestAddress
impl PartialEq for ManifestAddress
Source§impl PartialOrd for ManifestAddress
impl PartialOrd for ManifestAddress
Source§impl TryFrom<ManifestAddress> for ManifestComponentAddress
impl TryFrom<ManifestAddress> for ManifestComponentAddress
Source§type Error = ParseComponentAddressError
type Error = ParseComponentAddressError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ManifestAddress,
) -> Result<ManifestComponentAddress, <ManifestComponentAddress as TryFrom<ManifestAddress>>::Error>
fn try_from( value: ManifestAddress, ) -> Result<ManifestComponentAddress, <ManifestComponentAddress as TryFrom<ManifestAddress>>::Error>
Performs the conversion.
Source§impl TryFrom<ManifestAddress> for ManifestGlobalAddress
impl TryFrom<ManifestAddress> for ManifestGlobalAddress
Source§type Error = ParseGlobalAddressError
type Error = ParseGlobalAddressError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ManifestAddress,
) -> Result<ManifestGlobalAddress, <ManifestGlobalAddress as TryFrom<ManifestAddress>>::Error>
fn try_from( value: ManifestAddress, ) -> Result<ManifestGlobalAddress, <ManifestGlobalAddress as TryFrom<ManifestAddress>>::Error>
Performs the conversion.
Source§impl TryFrom<ManifestAddress> for ManifestPackageAddress
impl TryFrom<ManifestAddress> for ManifestPackageAddress
Source§type Error = ParsePackageAddressError
type Error = ParsePackageAddressError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ManifestAddress,
) -> Result<ManifestPackageAddress, <ManifestPackageAddress as TryFrom<ManifestAddress>>::Error>
fn try_from( value: ManifestAddress, ) -> Result<ManifestPackageAddress, <ManifestPackageAddress as TryFrom<ManifestAddress>>::Error>
Performs the conversion.
Source§impl TryFrom<ManifestAddress> for ManifestResourceAddress
impl TryFrom<ManifestAddress> for ManifestResourceAddress
Source§type Error = ParseResourceAddressError
type Error = ParseResourceAddressError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ManifestAddress,
) -> Result<ManifestResourceAddress, <ManifestResourceAddress as TryFrom<ManifestAddress>>::Error>
fn try_from( value: ManifestAddress, ) -> Result<ManifestResourceAddress, <ManifestResourceAddress as TryFrom<ManifestAddress>>::Error>
Performs the conversion.
impl Copy for ManifestAddress
impl Eq for ManifestAddress
impl StructuralPartialEq for ManifestAddress
Auto Trait Implementations§
impl Freeze for ManifestAddress
impl RefUnwindSafe for ManifestAddress
impl Send for ManifestAddress
impl Sync for ManifestAddress
impl Unpin for ManifestAddress
impl UnwindSafe for ManifestAddress
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
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.