#[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.
You must specify this container with btc
for the native BTC token, and eth
for the native ETH token. 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.
You must specify this container with btc
for the native BTC token, and eth
for the native ETH token. 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.
You must specify this container with btc
for the native BTC token, and eth
for the native ETH token. 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 ==
.