pub struct AliasOutput { /* private fields */ }
Expand description
Describes an alias account in the ledger that can be controlled by the state and governance controllers.
Implementations§
source§impl AliasOutput
impl AliasOutput
pub fn try_from_dtos<'a>( amount: OutputBuilderAmountDto, native_tokens: Option<Vec<NativeToken>>, alias_id: &AliasId, state_index: Option<u32>, state_metadata: Option<Vec<u8>>, foundry_counter: Option<u32>, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, immutable_features: Option<Vec<FeatureDto>>, params: impl Into<ValidationParams<'a>> + Send ) -> Result<Self, Error>
source§impl AliasOutput
impl AliasOutput
sourcepub const KIND: u8 = 4u8
pub const KIND: u8 = 4u8
The Output
kind of an AliasOutput
.
sourcepub const STATE_METADATA_LENGTH_MAX: u16 = 8_192u16
pub const STATE_METADATA_LENGTH_MAX: u16 = 8_192u16
Maximum possible length in bytes of the state metadata.
sourcepub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags = _
pub const ALLOWED_UNLOCK_CONDITIONS: UnlockConditionFlags = _
The set of allowed UnlockCondition
s for an AliasOutput
.
sourcepub const ALLOWED_FEATURES: FeatureFlags = _
pub const ALLOWED_FEATURES: FeatureFlags = _
The set of allowed Feature
s for an AliasOutput
.
sourcepub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags = _
pub const ALLOWED_IMMUTABLE_FEATURES: FeatureFlags = _
The set of allowed immutable Feature
s for an AliasOutput
.
sourcepub fn build_with_amount(amount: u64, alias_id: AliasId) -> AliasOutputBuilder
pub fn build_with_amount(amount: u64, alias_id: AliasId) -> AliasOutputBuilder
Creates a new AliasOutputBuilder
with a provided amount.
sourcepub fn build_with_minimum_storage_deposit(
rent_structure: RentStructure,
alias_id: AliasId
) -> AliasOutputBuilder
pub fn build_with_minimum_storage_deposit( rent_structure: RentStructure, alias_id: AliasId ) -> AliasOutputBuilder
Creates a new AliasOutputBuilder
with a provided rent structure.
The amount will be set to the minimum storage deposit.
sourcepub fn native_tokens(&self) -> &NativeTokens
pub fn native_tokens(&self) -> &NativeTokens
sourcepub fn alias_id_non_null(&self, output_id: &OutputId) -> AliasId
pub fn alias_id_non_null(&self, output_id: &OutputId) -> AliasId
Returns the alias ID if not null, or creates it from the output ID.
sourcepub fn state_index(&self) -> u32
pub fn state_index(&self) -> u32
sourcepub fn state_metadata(&self) -> &[u8] ⓘ
pub fn state_metadata(&self) -> &[u8] ⓘ
sourcepub fn foundry_counter(&self) -> u32
pub fn foundry_counter(&self) -> u32
sourcepub fn unlock_conditions(&self) -> &UnlockConditions
pub fn unlock_conditions(&self) -> &UnlockConditions
sourcepub fn immutable_features(&self) -> &Features
pub fn immutable_features(&self) -> &Features
sourcepub fn state_controller_address(&self) -> &Address
pub fn state_controller_address(&self) -> &Address
sourcepub fn governor_address(&self) -> &Address
pub fn governor_address(&self) -> &Address
sourcepub fn alias_address(&self, output_id: &OutputId) -> AliasAddress
pub fn alias_address(&self, output_id: &OutputId) -> AliasAddress
Returns the alias address for this output.
sourcepub fn unlock(
&self,
output_id: &OutputId,
unlock: &Unlock,
inputs: &[(&OutputId, &Output)],
context: &mut ValidationContext<'_>
) -> Result<(), ConflictReason>
pub fn unlock( &self, output_id: &OutputId, unlock: &Unlock, inputs: &[(&OutputId, &Output)], context: &mut ValidationContext<'_> ) -> Result<(), ConflictReason>
Trait Implementations§
source§impl Clone for AliasOutput
impl Clone for AliasOutput
source§fn clone(&self) -> AliasOutput
fn clone(&self) -> AliasOutput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AliasOutput
impl Debug for AliasOutput
source§impl From<&AliasOutput> for AliasOutputBuilder
impl From<&AliasOutput> for AliasOutputBuilder
source§fn from(output: &AliasOutput) -> Self
fn from(output: &AliasOutput) -> Self
source§impl From<&AliasOutput> for AliasOutputDto
impl From<&AliasOutput> for AliasOutputDto
source§fn from(value: &AliasOutput) -> Self
fn from(value: &AliasOutput) -> Self
source§impl From<AliasOutput> for Output
impl From<AliasOutput> for Output
source§fn from(original: AliasOutput) -> Output
fn from(original: AliasOutput) -> Output
source§impl Hash for AliasOutput
impl Hash for AliasOutput
source§impl Ord for AliasOutput
impl Ord for AliasOutput
source§fn cmp(&self, other: &AliasOutput) -> Ordering
fn cmp(&self, other: &AliasOutput) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl Packable for AliasOutput
impl Packable for AliasOutput
§type UnpackError = Error
type UnpackError = Error
§type UnpackVisitor = ProtocolParameters
type UnpackVisitor = ProtocolParameters
source§fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
fn pack<P: Packer>(&self, packer: &mut P) -> Result<(), P::Error>
Packer
.source§fn unpack<U: Unpacker, const VERIFY: bool>(
unpacker: &mut U,
visitor: &Self::UnpackVisitor
) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
fn unpack<U: Unpacker, const VERIFY: bool>( unpacker: &mut U, visitor: &Self::UnpackVisitor ) -> Result<Self, UnpackError<Self::UnpackError, U::Error>>
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for AliasOutput
impl PartialEq for AliasOutput
source§fn eq(&self, other: &AliasOutput) -> bool
fn eq(&self, other: &AliasOutput) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AliasOutput
impl PartialOrd for AliasOutput
source§fn partial_cmp(&self, other: &AliasOutput) -> Option<Ordering>
fn partial_cmp(&self, other: &AliasOutput) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StateTransitionVerifier for AliasOutput
impl StateTransitionVerifier for AliasOutput
fn creation( next_state: &Self, context: &ValidationContext<'_> ) -> Result<(), StateTransitionError>
fn transition( current_state: &Self, next_state: &Self, context: &ValidationContext<'_> ) -> Result<(), StateTransitionError>
fn destruction( _current_state: &Self, _context: &ValidationContext<'_> ) -> Result<(), StateTransitionError>
source§impl TryFromDto for AliasOutput
impl TryFromDto for AliasOutput
type Dto = AliasOutputDto
type Error = Error
fn try_from_dto_with_params_inner( dto: Self::Dto, params: ValidationParams<'_> ) -> Result<Self, Self::Error>
fn try_from_dto(dto: Self::Dto) -> Result<Self, Self::Error>
fn try_from_dto_with_params<'a>( dto: Self::Dto, params: impl Into<ValidationParams<'a>> + Send ) -> Result<Self, Self::Error>
impl Eq for AliasOutput
impl StructuralPartialEq for AliasOutput
Auto Trait Implementations§
impl Freeze for AliasOutput
impl RefUnwindSafe for AliasOutput
impl Send for AliasOutput
impl Sync for AliasOutput
impl Unpin for AliasOutput
impl UnwindSafe for AliasOutput
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<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
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 moresource§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
pack
.