#[non_exhaustive]pub struct TokenIdentifierBuilder { /* private fields */ }
Expand description
A builder for TokenIdentifier
.
Implementations§
source§impl TokenIdentifierBuilder
impl TokenIdentifierBuilder
sourcepub fn network(self, input: QueryNetwork) -> Self
pub fn network(self, input: QueryNetwork) -> Self
The blockchain network of the token.
This field is required.sourcepub fn set_network(self, input: Option<QueryNetwork>) -> Self
pub fn set_network(self, input: Option<QueryNetwork>) -> Self
The blockchain network of the token.
sourcepub fn get_network(&self) -> &Option<QueryNetwork>
pub fn get_network(&self) -> &Option<QueryNetwork>
The blockchain network of the token.
sourcepub fn contract_address(self, input: impl Into<String>) -> Self
pub fn contract_address(self, input: impl Into<String>) -> Self
This is the token's contract address.
sourcepub fn set_contract_address(self, input: Option<String>) -> Self
pub fn set_contract_address(self, input: Option<String>) -> Self
This is the token's contract address.
sourcepub fn get_contract_address(&self) -> &Option<String>
pub fn get_contract_address(&self) -> &Option<String>
This is the token's contract address.
sourcepub fn token_id(self, input: impl Into<String>) -> Self
pub fn token_id(self, input: impl Into<String>) -> Self
The unique identifier of the token.
For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the tokenId
in the 64 character hexadecimal tokenid
format.
sourcepub fn set_token_id(self, input: Option<String>) -> Self
pub fn set_token_id(self, input: Option<String>) -> Self
The unique identifier of the token.
For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the tokenId
in the 64 character hexadecimal tokenid
format.
sourcepub fn get_token_id(&self) -> &Option<String>
pub fn get_token_id(&self) -> &Option<String>
The unique identifier of the token.
For native tokens, use the 3 character abbreviation that best matches your token. For example, btc for Bitcoin, eth for Ether, etc. For all other token types you must specify the tokenId
in the 64 character hexadecimal tokenid
format.
sourcepub fn build(self) -> Result<TokenIdentifier, BuildError>
pub fn build(self) -> Result<TokenIdentifier, BuildError>
Consumes the builder and constructs a TokenIdentifier
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for TokenIdentifierBuilder
impl Clone for TokenIdentifierBuilder
source§fn clone(&self) -> TokenIdentifierBuilder
fn clone(&self) -> TokenIdentifierBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TokenIdentifierBuilder
impl Debug for TokenIdentifierBuilder
source§impl Default for TokenIdentifierBuilder
impl Default for TokenIdentifierBuilder
source§fn default() -> TokenIdentifierBuilder
fn default() -> TokenIdentifierBuilder
source§impl PartialEq for TokenIdentifierBuilder
impl PartialEq for TokenIdentifierBuilder
source§fn eq(&self, other: &TokenIdentifierBuilder) -> bool
fn eq(&self, other: &TokenIdentifierBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TokenIdentifierBuilder
Auto Trait Implementations§
impl Freeze for TokenIdentifierBuilder
impl RefUnwindSafe for TokenIdentifierBuilder
impl Send for TokenIdentifierBuilder
impl Sync for TokenIdentifierBuilder
impl Unpin for TokenIdentifierBuilder
impl UnwindSafe for TokenIdentifierBuilder
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