Struct Burn

Source
pub struct Burn { /* private fields */ }
Available on crate feature client only.
Expand description

A type to specify what needs to be burned during input selection. Nothing will be burned that has not been explicitly set with this struct.

Implementations§

Source§

impl Burn

Source

pub fn new() -> Self

Creates a new Burn.

Source

pub fn add_alias(self, alias_id: AliasId) -> Self

Adds an alias to Burn.

Source

pub fn set_aliases(self, aliases: HashSet<AliasId>) -> Self

Sets the aliases to Burn.

Source

pub fn aliases(&self) -> &HashSet<AliasId>

Returns the aliases to Burn.

Source

pub fn add_nft(self, nft_id: NftId) -> Self

Adds an NFT to Burn.

Source

pub fn set_nfts(self, nfts: HashSet<NftId>) -> Self

Sets the NFTs to Burn.

Source

pub fn nfts(&self) -> &HashSet<NftId>

Returns the NFTs to Burn.

Source

pub fn add_foundry(self, foundry_id: FoundryId) -> Self

Adds a foundry to Burn.

Source

pub fn set_foundries(self, foundries: HashSet<FoundryId>) -> Self

Sets the foundries to Burn.

Source

pub fn foundries(&self) -> &HashSet<FoundryId>

Returns the foundries to Burn.

Source

pub fn add_native_token( self, token_id: TokenId, amount: impl Into<U256>, ) -> Self

Adds an amount of native token to Burn.

Source

pub fn set_native_tokens( self, native_tokens: HashMap<TokenId, impl Into<U256>>, ) -> Self

Sets the amounts of native tokens to Burn.

Source

pub fn native_tokens(&self) -> &BTreeMap<TokenId, U256>

Returns the native tokens to Burn.

Trait Implementations§

Source§

impl Clone for Burn

Source§

fn clone(&self) -> Burn

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Burn

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Burn

Source§

fn default() -> Burn

Returns the “default value” for a type. Read more
Source§

impl From<&Burn> for BurnDto

Source§

fn from(value: &Burn) -> Self

Converts to this type from the input type.
Source§

impl From<AliasId> for Burn

Source§

fn from(id: AliasId) -> Self

Converts to this type from the input type.
Source§

impl From<BurnDto> for Burn

Source§

fn from(value: BurnDto) -> Self

Converts to this type from the input type.
Source§

impl From<FoundryId> for Burn

Source§

fn from(id: FoundryId) -> Self

Converts to this type from the input type.
Source§

impl From<NativeToken> for Burn

Source§

fn from(native_token: NativeToken) -> Self

Converts to this type from the input type.
Source§

impl From<NftId> for Burn

Source§

fn from(id: NftId) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Burn

Source§

fn eq(&self, other: &Burn) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Burn

Source§

impl StructuralPartialEq for Burn

Auto Trait Implementations§

§

impl Freeze for Burn

§

impl RefUnwindSafe for Burn

§

impl Send for Burn

§

impl Sync for Burn

§

impl Unpin for Burn

§

impl UnwindSafe for Burn

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ConvertTo<T> for T
where T: Send,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

impl<T> ErasedDestructor for T
where T: 'static,