Enum identity_iota::iota::block::output::UnlockCondition
source · pub enum UnlockCondition {
Address(AddressUnlockCondition),
StorageDepositReturn(StorageDepositReturnUnlockCondition),
Timelock(TimelockUnlockCondition),
Expiration(ExpirationUnlockCondition),
StateControllerAddress(StateControllerAddressUnlockCondition),
GovernorAddress(GovernorAddressUnlockCondition),
ImmutableAliasAddress(ImmutableAliasAddressUnlockCondition),
}
Expand description
Variants§
Address(AddressUnlockCondition)
An address unlock condition.
StorageDepositReturn(StorageDepositReturnUnlockCondition)
A storage deposit return unlock condition.
Timelock(TimelockUnlockCondition)
A timelock unlock condition.
Expiration(ExpirationUnlockCondition)
An expiration unlock condition.
StateControllerAddress(StateControllerAddressUnlockCondition)
A state controller address unlock condition.
GovernorAddress(GovernorAddressUnlockCondition)
A governor address unlock condition.
ImmutableAliasAddress(ImmutableAliasAddressUnlockCondition)
An immutable alias address unlock condition.
Implementations§
source§impl UnlockCondition
impl UnlockCondition
sourcepub fn is_address(&self) -> bool
pub fn is_address(&self) -> bool
Checks whether the unlock condition is an AddressUnlockCondition
.
sourcepub fn as_address(&self) -> &AddressUnlockCondition
pub fn as_address(&self) -> &AddressUnlockCondition
Gets the unlock condition as an actual AddressUnlockCondition
.
NOTE: Will panic if the unlock condition is not an AddressUnlockCondition
.
sourcepub fn is_storage_deposit_return(&self) -> bool
pub fn is_storage_deposit_return(&self) -> bool
Checks whether the unlock condition is a StorageDepositReturnUnlockCondition
.
sourcepub fn as_storage_deposit_return(&self) -> &StorageDepositReturnUnlockCondition
pub fn as_storage_deposit_return(&self) -> &StorageDepositReturnUnlockCondition
Gets the unlock condition as an actual StorageDepositReturnUnlockCondition
.
NOTE: Will panic if the unlock condition is not a StorageDepositReturnUnlockCondition
.
sourcepub fn is_timelock(&self) -> bool
pub fn is_timelock(&self) -> bool
Checks whether the unlock condition is a TimelockUnlockCondition
.
sourcepub fn as_timelock(&self) -> &TimelockUnlockCondition
pub fn as_timelock(&self) -> &TimelockUnlockCondition
Gets the unlock condition as an actual TimelockUnlockCondition
.
NOTE: Will panic if the unlock condition is not a TimelockUnlockCondition
.
sourcepub fn is_expiration(&self) -> bool
pub fn is_expiration(&self) -> bool
Checks whether the unlock condition is an ExpirationUnlockCondition
.
sourcepub fn as_expiration(&self) -> &ExpirationUnlockCondition
pub fn as_expiration(&self) -> &ExpirationUnlockCondition
Gets the unlock condition as an actual ExpirationUnlockCondition
.
NOTE: Will panic if the unlock condition is not an ExpirationUnlockCondition
.
sourcepub fn is_state_controller_address(&self) -> bool
pub fn is_state_controller_address(&self) -> bool
Checks whether the unlock condition is a StateControllerAddressUnlockCondition
.
sourcepub fn as_state_controller_address(
&self,
) -> &StateControllerAddressUnlockCondition
pub fn as_state_controller_address( &self, ) -> &StateControllerAddressUnlockCondition
Gets the unlock condition as an actual StateControllerAddressUnlockCondition
.
NOTE: Will panic if the unlock condition is not a StateControllerAddressUnlockCondition
.
sourcepub fn is_governor_address(&self) -> bool
pub fn is_governor_address(&self) -> bool
Checks whether the unlock condition is a GovernorAddressUnlockCondition
.
sourcepub fn as_governor_address(&self) -> &GovernorAddressUnlockCondition
pub fn as_governor_address(&self) -> &GovernorAddressUnlockCondition
Gets the unlock condition as an actual GovernorAddressUnlockCondition
.
NOTE: Will panic if the unlock condition is not a GovernorAddressUnlockCondition
.
sourcepub fn is_immutable_alias_address(&self) -> bool
pub fn is_immutable_alias_address(&self) -> bool
Checks whether the unlock condition is an ImmutableAliasAddressUnlockCondition
.
sourcepub fn as_immutable_alias_address(
&self,
) -> &ImmutableAliasAddressUnlockCondition
pub fn as_immutable_alias_address( &self, ) -> &ImmutableAliasAddressUnlockCondition
Gets the unlock condition as an actual ImmutableAliasAddressUnlockCondition
.
NOTE: Will panic if the unlock condition is not an ImmutableAliasAddressUnlockCondition
.
Trait Implementations§
source§impl Clone for UnlockCondition
impl Clone for UnlockCondition
source§fn clone(&self) -> UnlockCondition
fn clone(&self) -> UnlockCondition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UnlockCondition
impl Debug for UnlockCondition
source§impl From<&UnlockCondition> for UnlockConditionDto
impl From<&UnlockCondition> for UnlockConditionDto
source§fn from(value: &UnlockCondition) -> UnlockConditionDto
fn from(value: &UnlockCondition) -> UnlockConditionDto
source§impl From<AddressUnlockCondition> for UnlockCondition
impl From<AddressUnlockCondition> for UnlockCondition
source§fn from(original: AddressUnlockCondition) -> UnlockCondition
fn from(original: AddressUnlockCondition) -> UnlockCondition
source§impl From<ExpirationUnlockCondition> for UnlockCondition
impl From<ExpirationUnlockCondition> for UnlockCondition
source§fn from(original: ExpirationUnlockCondition) -> UnlockCondition
fn from(original: ExpirationUnlockCondition) -> UnlockCondition
source§impl From<GovernorAddressUnlockCondition> for UnlockCondition
impl From<GovernorAddressUnlockCondition> for UnlockCondition
source§fn from(original: GovernorAddressUnlockCondition) -> UnlockCondition
fn from(original: GovernorAddressUnlockCondition) -> UnlockCondition
source§impl From<ImmutableAliasAddressUnlockCondition> for UnlockCondition
impl From<ImmutableAliasAddressUnlockCondition> for UnlockCondition
source§fn from(original: ImmutableAliasAddressUnlockCondition) -> UnlockCondition
fn from(original: ImmutableAliasAddressUnlockCondition) -> UnlockCondition
source§impl From<StateControllerAddressUnlockCondition> for UnlockCondition
impl From<StateControllerAddressUnlockCondition> for UnlockCondition
source§fn from(original: StateControllerAddressUnlockCondition) -> UnlockCondition
fn from(original: StateControllerAddressUnlockCondition) -> UnlockCondition
source§impl From<StorageDepositReturnUnlockCondition> for UnlockCondition
impl From<StorageDepositReturnUnlockCondition> for UnlockCondition
source§fn from(original: StorageDepositReturnUnlockCondition) -> UnlockCondition
fn from(original: StorageDepositReturnUnlockCondition) -> UnlockCondition
source§impl From<TimelockUnlockCondition> for UnlockCondition
impl From<TimelockUnlockCondition> for UnlockCondition
source§fn from(original: TimelockUnlockCondition) -> UnlockCondition
fn from(original: TimelockUnlockCondition) -> UnlockCondition
source§impl Hash for UnlockCondition
impl Hash for UnlockCondition
source§impl Ord for UnlockCondition
impl Ord for UnlockCondition
source§fn cmp(&self, other: &UnlockCondition) -> Ordering
fn cmp(&self, other: &UnlockCondition) -> 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 UnlockCondition
impl Packable for UnlockCondition
§type UnpackError = Error
type UnpackError = Error
§type UnpackVisitor = ProtocolParameters
type UnpackVisitor = ProtocolParameters
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,
Packer
.source§fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<UnlockCondition as Packable>::UnpackVisitor,
) -> Result<UnlockCondition, UnpackError<<UnlockCondition as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<UnlockCondition as Packable>::UnpackVisitor,
) -> Result<UnlockCondition, UnpackError<<UnlockCondition as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for UnlockCondition
impl PartialEq for UnlockCondition
source§fn eq(&self, other: &UnlockCondition) -> bool
fn eq(&self, other: &UnlockCondition) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UnlockCondition
impl PartialOrd for UnlockCondition
source§fn partial_cmp(&self, other: &UnlockCondition) -> Option<Ordering>
fn partial_cmp(&self, other: &UnlockCondition) -> 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 TryFromDto for UnlockCondition
impl TryFromDto for UnlockCondition
type Dto = UnlockConditionDto
type Error = Error
fn try_from_dto_with_params_inner( dto: <UnlockCondition as TryFromDto>::Dto, params: ValidationParams<'_>, ) -> Result<UnlockCondition, <UnlockCondition as TryFromDto>::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 UnlockCondition
impl StructuralPartialEq for UnlockCondition
Auto Trait Implementations§
impl Freeze for UnlockCondition
impl RefUnwindSafe for UnlockCondition
impl Send for UnlockCondition
impl Sync for UnlockCondition
impl Unpin for UnlockCondition
impl UnwindSafe for UnlockCondition
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> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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
.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.