pub struct NftOutputBuilder { /* private fields */ }
Expand description
Implementations§
source§impl NftOutputBuilder
impl NftOutputBuilder
sourcepub fn new_with_amount(amount: u64, nft_id: NftId) -> Self
pub fn new_with_amount(amount: u64, nft_id: NftId) -> Self
Creates an NftOutputBuilder
with a provided amount.
sourcepub fn new_with_minimum_storage_deposit(
rent_structure: RentStructure,
nft_id: NftId
) -> Self
pub fn new_with_minimum_storage_deposit( rent_structure: RentStructure, nft_id: NftId ) -> Self
Creates an NftOutputBuilder
with a provided rent structure.
The amount will be set to the minimum storage deposit.
sourcepub fn with_amount(self, amount: u64) -> Self
pub fn with_amount(self, amount: u64) -> Self
Sets the amount to the provided value.
sourcepub fn with_minimum_storage_deposit(self, rent_structure: RentStructure) -> Self
pub fn with_minimum_storage_deposit(self, rent_structure: RentStructure) -> Self
Sets the amount to the minimum storage deposit.
sourcepub fn add_native_token(self, native_token: NativeToken) -> Self
pub fn add_native_token(self, native_token: NativeToken) -> Self
sourcepub fn with_native_tokens(
self,
native_tokens: impl IntoIterator<Item = NativeToken>
) -> Self
pub fn with_native_tokens( self, native_tokens: impl IntoIterator<Item = NativeToken> ) -> Self
sourcepub fn with_nft_id(self, nft_id: NftId) -> Self
pub fn with_nft_id(self, nft_id: NftId) -> Self
Sets the NFT ID to the provided value.
sourcepub fn add_unlock_condition(
self,
unlock_condition: impl Into<UnlockCondition>
) -> Self
pub fn add_unlock_condition( self, unlock_condition: impl Into<UnlockCondition> ) -> Self
Adds an UnlockCondition
to the builder, if one does not already exist of that type.
sourcepub fn with_unlock_conditions(
self,
unlock_conditions: impl IntoIterator<Item = impl Into<UnlockCondition>>
) -> Self
pub fn with_unlock_conditions( self, unlock_conditions: impl IntoIterator<Item = impl Into<UnlockCondition>> ) -> Self
Sets the UnlockConditions
s in the builder, overwriting any existing values.
sourcepub fn replace_unlock_condition(
self,
unlock_condition: impl Into<UnlockCondition>
) -> Self
pub fn replace_unlock_condition( self, unlock_condition: impl Into<UnlockCondition> ) -> Self
Replaces an UnlockCondition
of the builder with a new one, or adds it.
sourcepub fn clear_unlock_conditions(self) -> Self
pub fn clear_unlock_conditions(self) -> Self
Clears all UnlockConditions
s from the builder.
sourcepub fn add_feature(self, feature: impl Into<Feature>) -> Self
pub fn add_feature(self, feature: impl Into<Feature>) -> Self
Adds a Feature
to the builder, if one does not already exist of that type.
sourcepub fn with_features(
self,
features: impl IntoIterator<Item = impl Into<Feature>>
) -> Self
pub fn with_features( self, features: impl IntoIterator<Item = impl Into<Feature>> ) -> Self
Sets the Feature
s in the builder, overwriting any existing values.
sourcepub fn replace_feature(self, feature: impl Into<Feature>) -> Self
pub fn replace_feature(self, feature: impl Into<Feature>) -> Self
Replaces a Feature
of the builder with a new one, or adds it.
sourcepub fn clear_features(self) -> Self
pub fn clear_features(self) -> Self
Clears all Feature
s from the builder.
sourcepub fn add_immutable_feature(
self,
immutable_feature: impl Into<Feature>
) -> Self
pub fn add_immutable_feature( self, immutable_feature: impl Into<Feature> ) -> Self
Adds an immutable Feature
to the builder, if one does not already exist of that type.
sourcepub fn with_immutable_features(
self,
immutable_features: impl IntoIterator<Item = impl Into<Feature>>
) -> Self
pub fn with_immutable_features( self, immutable_features: impl IntoIterator<Item = impl Into<Feature>> ) -> Self
Sets the immutable Feature
s in the builder, overwriting any existing values.
sourcepub fn replace_immutable_feature(
self,
immutable_feature: impl Into<Feature>
) -> Self
pub fn replace_immutable_feature( self, immutable_feature: impl Into<Feature> ) -> Self
Replaces an immutable Feature
of the builder with a new one, or adds it.
sourcepub fn clear_immutable_features(self) -> Self
pub fn clear_immutable_features(self) -> Self
Clears all immutable Feature
s from the builder.
sourcepub fn finish_with_params<'a>(
self,
params: impl Into<ValidationParams<'a>> + Send
) -> Result<NftOutput, Error>
pub fn finish_with_params<'a>( self, params: impl Into<ValidationParams<'a>> + Send ) -> Result<NftOutput, Error>
sourcepub fn finish_output<'a>(
self,
params: impl Into<ValidationParams<'a>> + Send
) -> Result<Output, Error>
pub fn finish_output<'a>( self, params: impl Into<ValidationParams<'a>> + Send ) -> Result<Output, Error>
Finishes the NftOutputBuilder
into an Output
.
Trait Implementations§
source§impl Clone for NftOutputBuilder
impl Clone for NftOutputBuilder
source§fn clone(&self) -> NftOutputBuilder
fn clone(&self) -> NftOutputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for NftOutputBuilder
impl RefUnwindSafe for NftOutputBuilder
impl Send for NftOutputBuilder
impl Sync for NftOutputBuilder
impl Unpin for NftOutputBuilder
impl UnwindSafe for NftOutputBuilder
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<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 more