Struct iota_sdk::types::block::output::unlock_condition::UnlockConditions
source · pub struct UnlockConditions(/* private fields */);
Expand description
Implementations§
source§impl UnlockConditions
impl UnlockConditions
sourcepub fn from_vec(unlock_conditions: Vec<UnlockCondition>) -> Result<Self, Error>
pub fn from_vec(unlock_conditions: Vec<UnlockCondition>) -> Result<Self, Error>
Creates a new UnlockConditions
from a vec.
sourcepub fn from_set(
unlock_conditions: BTreeSet<UnlockCondition>
) -> Result<Self, Error>
pub fn from_set( unlock_conditions: BTreeSet<UnlockCondition> ) -> Result<Self, Error>
Creates a new UnlockConditions
from an ordered set.
sourcepub fn get(&self, key: u8) -> Option<&UnlockCondition>
pub fn get(&self, key: u8) -> Option<&UnlockCondition>
Gets a reference to an UnlockCondition
from an unlock condition kind, if any.
sourcepub fn address(&self) -> Option<&AddressUnlockCondition>
pub fn address(&self) -> Option<&AddressUnlockCondition>
Gets a reference to an AddressUnlockCondition
, if any.
sourcepub fn storage_deposit_return(
&self
) -> Option<&StorageDepositReturnUnlockCondition>
pub fn storage_deposit_return( &self ) -> Option<&StorageDepositReturnUnlockCondition>
Gets a reference to a StorageDepositReturnUnlockCondition
, if any.
sourcepub fn timelock(&self) -> Option<&TimelockUnlockCondition>
pub fn timelock(&self) -> Option<&TimelockUnlockCondition>
Gets a reference to a TimelockUnlockCondition
, if any.
sourcepub fn expiration(&self) -> Option<&ExpirationUnlockCondition>
pub fn expiration(&self) -> Option<&ExpirationUnlockCondition>
Gets a reference to an ExpirationUnlockCondition
, if any.
sourcepub fn state_controller_address(
&self
) -> Option<&StateControllerAddressUnlockCondition>
pub fn state_controller_address( &self ) -> Option<&StateControllerAddressUnlockCondition>
Gets a reference to a StateControllerAddressUnlockCondition
, if any.
sourcepub fn governor_address(&self) -> Option<&GovernorAddressUnlockCondition>
pub fn governor_address(&self) -> Option<&GovernorAddressUnlockCondition>
Gets a reference to a GovernorAddressUnlockCondition
, if any.
sourcepub fn immutable_alias_address(
&self
) -> Option<&ImmutableAliasAddressUnlockCondition>
pub fn immutable_alias_address( &self ) -> Option<&ImmutableAliasAddressUnlockCondition>
Gets a reference to an ImmutableAliasAddressUnlockCondition
, if any.
sourcepub fn locked_address<'a>(
&'a self,
address: &'a Address,
milestone_timestamp: u32
) -> &'a Address
pub fn locked_address<'a>( &'a self, address: &'a Address, milestone_timestamp: u32 ) -> &'a Address
Returns the address to be unlocked.
sourcepub fn is_time_locked(&self, milestone_timestamp: u32) -> bool
pub fn is_time_locked(&self, milestone_timestamp: u32) -> bool
Returns whether a time lock exists and is still relevant.
sourcepub fn is_expired(&self, milestone_timestamp: u32) -> bool
pub fn is_expired(&self, milestone_timestamp: u32) -> bool
Returns whether an expiration exists and is expired.
Trait Implementations§
source§impl Clone for UnlockConditions
impl Clone for UnlockConditions
source§fn clone(&self) -> UnlockConditions
fn clone(&self) -> UnlockConditions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UnlockConditions
impl Debug for UnlockConditions
source§impl Deref for UnlockConditions
impl Deref for UnlockConditions
§type Target = BoxedSlicePrefix<UnlockCondition, BoundedU8<0, { UnlockConditions::COUNT_MAX }>>
type Target = BoxedSlicePrefix<UnlockCondition, BoundedU8<0, { UnlockConditions::COUNT_MAX }>>
source§impl Hash for UnlockConditions
impl Hash for UnlockConditions
source§impl IntoIterator for UnlockConditions
impl IntoIterator for UnlockConditions
§type Item = UnlockCondition
type Item = UnlockCondition
§type IntoIter = IntoIter<<UnlockConditions as IntoIterator>::Item>
type IntoIter = IntoIter<<UnlockConditions as IntoIterator>::Item>
source§impl Ord for UnlockConditions
impl Ord for UnlockConditions
source§fn cmp(&self, other: &UnlockConditions) -> Ordering
fn cmp(&self, other: &UnlockConditions) -> 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 UnlockConditions
impl Packable for UnlockConditions
§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 UnlockConditions
impl PartialEq for UnlockConditions
source§fn eq(&self, other: &UnlockConditions) -> bool
fn eq(&self, other: &UnlockConditions) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UnlockConditions
impl PartialOrd for UnlockConditions
source§fn partial_cmp(&self, other: &UnlockConditions) -> Option<Ordering>
fn partial_cmp(&self, other: &UnlockConditions) -> 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 TryFrom<BTreeSet<UnlockCondition>> for UnlockConditions
impl TryFrom<BTreeSet<UnlockCondition>> for UnlockConditions
source§impl TryFrom<Vec<UnlockCondition>> for UnlockConditions
impl TryFrom<Vec<UnlockCondition>> for UnlockConditions
impl Eq for UnlockConditions
impl StructuralPartialEq for UnlockConditions
Auto Trait Implementations§
impl Freeze for UnlockConditions
impl RefUnwindSafe for UnlockConditions
impl Send for UnlockConditions
impl Sync for UnlockConditions
impl Unpin for UnlockConditions
impl UnwindSafe for UnlockConditions
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
.