pub enum Identity {
V0(IdentityV0),
}
Expand description
The identity is not stored inside of drive, because of this, the serialization is mainly for transport, the serialization of the identity will include the version, so no passthrough or untagged is needed here
Variants§
V0(IdentityV0)
Implementations§
§impl Identity
impl Identity
pub fn default_versioned( platform_version: &PlatformVersion, ) -> Result<Identity, ProtocolError>
pub fn new_with_id_and_keys(
id: Identifier,
public_keys: BTreeMap<u32, IdentityPublicKey>,
platform_version: &PlatformVersion,
) -> Result<Identity, ProtocolError>
pub fn new_with_id_and_keys( id: Identifier, public_keys: BTreeMap<u32, IdentityPublicKey>, platform_version: &PlatformVersion, ) -> Result<Identity, ProtocolError>
Created a new identity based on asset locks and keys
pub fn into_partial_identity_info(self) -> PartialIdentity
pub fn into_partial_identity_info(self) -> PartialIdentity
Convenience method to get Partial Identity Info
pub fn into_partial_identity_info_no_balance(self) -> PartialIdentity
pub fn into_partial_identity_info_no_balance(self) -> PartialIdentity
Convenience method to get Partial Identity Info
§impl Identity
impl Identity
pub fn create_basic_identity( id: Identifier, platform_version: &PlatformVersion, ) -> Result<Identity, ProtocolError>
§impl Identity
impl Identity
pub fn random_identity_with_rng(
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<Identity, ProtocolError>
pub fn random_identity_with_rng( key_count: u32, rng: &mut StdRng, platform_version: &PlatformVersion, ) -> Result<Identity, ProtocolError>
Generates a random identity using the specified version and key count, with a provided RNG.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.key_count
- The number of keys to generate for the identity.rng
- A mutable reference to a random number generator to use for generating the identity.
§Returns
A randomly generated identity of the specified version.
§Panics
This function will panic if an unsupported version is provided.
pub fn random_identity_with_main_keys_with_private_key<I>(
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<(Identity, I), ProtocolError>where
I: Default + IntoIterator<Item = (IdentityPublicKey, Vec<u8>)> + Extend<(IdentityPublicKey, Vec<u8>)>,
pub fn random_identity_with_main_keys_with_private_key<I>(
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<(Identity, I), ProtocolError>where
I: Default + IntoIterator<Item = (IdentityPublicKey, Vec<u8>)> + Extend<(IdentityPublicKey, Vec<u8>)>,
Generates a random identity with main keys and their corresponding private keys, using the specified version and key count, with a provided RNG.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.key_count
- The number of keys to generate for the identity.rng
- A mutable reference to a random number generator to use for generating the identity.
§Returns
A tuple containing the randomly generated identity and a collection of main keys with their corresponding private keys.
§Panics
This function will panic if an unsupported version is provided.
§Errors
This function may return a ProtocolError
if an error occurs during identity generation.
pub fn random_identity(
key_count: u32,
seed: Option<u64>,
platform_version: &PlatformVersion,
) -> Result<Identity, ProtocolError>
pub fn random_identity( key_count: u32, seed: Option<u64>, platform_version: &PlatformVersion, ) -> Result<Identity, ProtocolError>
Generates a random identity using the specified version and key count, with an optional seed for reproducibility.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.key_count
- The number of keys to generate for the identity.seed
- An optional seed for reproducibility. If provided, the RNG will be seeded with this value.
§Returns
A randomly generated identity of the specified version.
§Panics
This function will panic if an unsupported version is provided.
pub fn random_identities(
count: u16,
key_count: u32,
seed: Option<u64>,
platform_version: &PlatformVersion,
) -> Result<Vec<Identity>, ProtocolError>
pub fn random_identities( count: u16, key_count: u32, seed: Option<u64>, platform_version: &PlatformVersion, ) -> Result<Vec<Identity>, ProtocolError>
Generates a specified number of random identities using the specified version and key count, with an optional seed for reproducibility.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.count
- The number of identities to generate.key_count
- The number of keys to generate for each identity.seed
- An optional seed for reproducibility. If provided, the RNG will be seeded with this value.
§Returns
A vector of randomly generated identities of the specified version.
§Panics
This function will panic if an unsupported version is provided.
pub fn random_identities_with_rng(
count: u16,
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<Vec<Identity>, ProtocolError>
pub fn random_identities_with_rng( count: u16, key_count: u32, rng: &mut StdRng, platform_version: &PlatformVersion, ) -> Result<Vec<Identity>, ProtocolError>
Generates a specified number of random identities using the specified version and key count, with a provided RNG.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.count
- The number of identities to generate.key_count
- The number of keys to generate for each identity.rng
- A mutable reference to a random number generator to use for generating the identities.
§Returns
A vector of randomly generated identities of the specified version.
§Panics
This function will panic if an unsupported version is provided.
pub fn random_identities_with_private_keys_with_rng<I>(
count: u16,
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<(Vec<Identity>, I), ProtocolError>where
I: Default + FromIterator<(IdentityPublicKey, Vec<u8>)> + Extend<(IdentityPublicKey, Vec<u8>)>,
pub fn random_identities_with_private_keys_with_rng<I>(
count: u16,
key_count: u32,
rng: &mut StdRng,
platform_version: &PlatformVersion,
) -> Result<(Vec<Identity>, I), ProtocolError>where
I: Default + FromIterator<(IdentityPublicKey, Vec<u8>)> + Extend<(IdentityPublicKey, Vec<u8>)>,
Generates a specified number of random identities with their corresponding private keys, using the specified version, key count, and a provided RNG.
§Arguments
version
- An optional feature version for the identity. If not provided, the latest version will be used.count
- The number of identities to generate.key_count
- The number of keys to generate for each identity.rng
- A mutable reference to a random number generator to use for generating the identities.
§Returns
A tuple containing a vector of randomly generated identities and a collection of main keys with their corresponding private keys.
§Panics
This function will panic if an unsupported version is provided.
§Errors
This function may return a ProtocolError
if an error occurs during identity generation.
Trait Implementations§
§impl<'__de> BorrowDecode<'__de> for Identity
impl<'__de> BorrowDecode<'__de> for Identity
§fn borrow_decode<__D>(decoder: &mut __D) -> Result<Identity, DecodeError>where
__D: BorrowDecoder<'__de>,
fn borrow_decode<__D>(decoder: &mut __D) -> Result<Identity, DecodeError>where
__D: BorrowDecoder<'__de>,
§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Identity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Identity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Fetch for Identity
impl Fetch for Identity
§type Request = IdentityRequest
type Request = IdentityRequest
source§fn fetch<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
fn fetch<'life0, 'async_trait, Q>( sdk: &'life0 Sdk, query: Q, ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
source§fn fetch_with_metadata<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
settings: Option<RequestSettings>,
) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata), Error>> + Send + 'async_trait>>
fn fetch_with_metadata<'life0, 'async_trait, Q>( sdk: &'life0 Sdk, query: Q, settings: Option<RequestSettings>, ) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata), Error>> + Send + 'async_trait>>
source§fn fetch_with_metadata_and_proof<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
settings: Option<RequestSettings>,
) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
fn fetch_with_metadata_and_proof<'life0, 'async_trait, Q>( sdk: &'life0 Sdk, query: Q, settings: Option<RequestSettings>, ) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
source§fn fetch_with_settings<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
settings: RequestSettings,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
fn fetch_with_settings<'life0, 'async_trait, Q>( sdk: &'life0 Sdk, query: Q, settings: RequestSettings, ) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
§impl FromProof<GetIdentityByPublicKeyHashRequest> for Identity
impl FromProof<GetIdentityByPublicKeyHashRequest> for Identity
§type Request = GetIdentityByPublicKeyHashRequest
type Request = GetIdentityByPublicKeyHashRequest
§type Response = GetIdentityByPublicKeyHashResponse
type Response = GetIdentityByPublicKeyHashResponse
§fn maybe_from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
_network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Identity>, ResponseMetadata, Proof), Error>where
I: Into<<Identity as FromProof<GetIdentityByPublicKeyHashRequest>>::Request>,
O: Into<<Identity as FromProof<GetIdentityByPublicKeyHashRequest>>::Response>,
Identity: 'a,
fn maybe_from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
_network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Identity>, ResponseMetadata, Proof), Error>where
I: Into<<Identity as FromProof<GetIdentityByPublicKeyHashRequest>>::Request>,
O: Into<<Identity as FromProof<GetIdentityByPublicKeyHashRequest>>::Response>,
Identity: 'a,
§fn maybe_from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Option<Self>, Error>
fn maybe_from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Option<Self>, Error>
§fn from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Self, Error>
fn from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Self, Error>
§fn from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata), Error>
fn from_proof_with_metadata<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata), Error>
§fn from_proof_with_metadata_and_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata, Proof), Error>
fn from_proof_with_metadata_and_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata, Proof), Error>
§impl FromProof<GetIdentityRequest> for Identity
impl FromProof<GetIdentityRequest> for Identity
§type Request = GetIdentityRequest
type Request = GetIdentityRequest
§type Response = GetIdentityResponse
type Response = GetIdentityResponse
§fn maybe_from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
_network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Identity>, ResponseMetadata, Proof), Error>where
I: Into<<Identity as FromProof<GetIdentityRequest>>::Request>,
O: Into<<Identity as FromProof<GetIdentityRequest>>::Response>,
Identity: Sized + 'a,
fn maybe_from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
_network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Identity>, ResponseMetadata, Proof), Error>where
I: Into<<Identity as FromProof<GetIdentityRequest>>::Request>,
O: Into<<Identity as FromProof<GetIdentityRequest>>::Response>,
Identity: Sized + 'a,
§fn maybe_from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Option<Self>, Error>
fn maybe_from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Option<Self>, Error>
§fn from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Self, Error>
fn from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Self, Error>
§fn from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata), Error>
fn from_proof_with_metadata<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata), Error>
§fn from_proof_with_metadata_and_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata, Proof), Error>
fn from_proof_with_metadata_and_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata, Proof), Error>
source§impl FromProof<IdentityRequest> for Identity
impl FromProof<IdentityRequest> for Identity
§type Request = IdentityRequest
type Request = IdentityRequest
§type Response = IdentityResponse
type Response = IdentityResponse
source§fn maybe_from_proof_with_metadata<'a, I: Into<Self::Request>, O: Into<Self::Response>>(
request: I,
response: O,
network: Network,
version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Self>, ResponseMetadata, Proof), Error>where
Self: Sized + 'a,
fn maybe_from_proof_with_metadata<'a, I: Into<Self::Request>, O: Into<Self::Response>>(
request: I,
response: O,
network: Network,
version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Option<Self>, ResponseMetadata, Proof), Error>where
Self: Sized + 'a,
§fn maybe_from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Option<Self>, Error>
fn maybe_from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Option<Self>, Error>
§fn from_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<Self, Error>
fn from_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<Self, Error>
§fn from_proof_with_metadata<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata), Error>
fn from_proof_with_metadata<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata), Error>
§fn from_proof_with_metadata_and_proof<'a, I, O>(
request: I,
response: O,
network: Network,
platform_version: &PlatformVersion,
provider: &'a dyn ContextProvider,
) -> Result<(Self, ResponseMetadata, Proof), Error>
fn from_proof_with_metadata_and_proof<'a, I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, provider: &'a dyn ContextProvider, ) -> Result<(Self, ResponseMetadata, Proof), Error>
§impl IdentityGettersV0 for Identity
impl IdentityGettersV0 for Identity
§fn public_keys(&self) -> &BTreeMap<u32, IdentityPublicKey>
fn public_keys(&self) -> &BTreeMap<u32, IdentityPublicKey>
Returns a reference to the public keys of the identity.
§Returns
A reference to a BTreeMap
containing the KeyID
as keys and IdentityPublicKey
as values.
§fn public_keys_mut(&mut self) -> &mut BTreeMap<u32, IdentityPublicKey>
fn public_keys_mut(&mut self) -> &mut BTreeMap<u32, IdentityPublicKey>
Returns a mutable reference to the public keys of the identity.
§Returns
A mutable reference to a BTreeMap
containing the KeyID
as keys and IdentityPublicKey
as values.
§fn public_keys_owned(self) -> BTreeMap<u32, IdentityPublicKey>
fn public_keys_owned(self) -> BTreeMap<u32, IdentityPublicKey>
Consumes the Identity
and returns the owned public keys.
§Returns
A BTreeMap
containing the KeyID
as keys and IdentityPublicKey
as values.
§fn id(&self) -> Identifier
fn id(&self) -> Identifier
§fn get_public_key_by_id(&self, key_id: u32) -> Option<&IdentityPublicKey>
fn get_public_key_by_id(&self, key_id: u32) -> Option<&IdentityPublicKey>
Returns a public key for a given id
§fn get_public_key_by_id_mut(
&mut self,
key_id: u32,
) -> Option<&mut IdentityPublicKey>
fn get_public_key_by_id_mut( &mut self, key_id: u32, ) -> Option<&mut IdentityPublicKey>
Returns a public key for a given id
§fn get_public_key_max_id(&self) -> u32
fn get_public_key_max_id(&self) -> u32
Get the biggest public KeyID
§fn add_public_key(&mut self, key: IdentityPublicKey)
fn add_public_key(&mut self, key: IdentityPublicKey)
Add an identity public key
§fn add_public_keys(&mut self, keys: impl IntoIterator<Item = IdentityPublicKey>)
fn add_public_keys(&mut self, keys: impl IntoIterator<Item = IdentityPublicKey>)
Add identity public keys
§fn get_first_public_key_matching(
&self,
purpose: Purpose,
security_levels: HashSet<SecurityLevel>,
key_types: HashSet<KeyType>,
allow_disabled: bool,
) -> Option<&IdentityPublicKey>
fn get_first_public_key_matching( &self, purpose: Purpose, security_levels: HashSet<SecurityLevel>, key_types: HashSet<KeyType>, allow_disabled: bool, ) -> Option<&IdentityPublicKey>
Get first public key matching a purpose, security levels, or key types, optionally allowing disabled keys
§impl IdentitySettersV0 for Identity
impl IdentitySettersV0 for Identity
§fn set_public_keys(&mut self, new_public_keys: BTreeMap<u32, IdentityPublicKey>)
fn set_public_keys(&mut self, new_public_keys: BTreeMap<u32, IdentityPublicKey>)
Sets the public keys of the identity.
§Arguments
new_public_keys
- ABTreeMap
containing the newKeyID
as keys andIdentityPublicKey
as values.
§fn set_balance(&mut self, new_balance: u64)
fn set_balance(&mut self, new_balance: u64)
§fn set_revision(&mut self, new_revision: u64)
fn set_revision(&mut self, new_revision: u64)
§fn bump_revision(&mut self)
fn bump_revision(&mut self)
Sets the revision of the identity to +1.
§fn set_id(&mut self, new_id: Identifier)
fn set_id(&mut self, new_id: Identifier)
§fn increase_balance(&mut self, amount: u64) -> u64
fn increase_balance(&mut self, amount: u64) -> u64
Increase Identity balance
§fn reduce_balance(&mut self, amount: u64) -> u64
fn reduce_balance(&mut self, amount: u64) -> u64
Reduce the Identity balance
§fn increment_revision(&mut self) -> Result<(), ProtocolError>
fn increment_revision(&mut self) -> Result<(), ProtocolError>
Increment revision
§impl Length for Identity
impl Length for Identity
§fn count_some(&self) -> usize
fn count_some(&self) -> usize
source§impl MockResponse for Identity
impl MockResponse for Identity
source§fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8> ⓘ
fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8> ⓘ
source§fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Selfwhere
Self: Sized,
fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Selfwhere
Self: Sized,
§impl PlatformVersionEncode for Identity
impl PlatformVersionEncode for Identity
§fn platform_encode<__E>(
&self,
encoder: &mut __E,
platform_version: &PlatformVersion,
) -> Result<(), EncodeError>where
__E: Encoder,
fn platform_encode<__E>(
&self,
encoder: &mut __E,
platform_version: &PlatformVersion,
) -> Result<(), EncodeError>where
__E: Encoder,
§impl<'__de> PlatformVersionedBorrowDecode<'__de> for Identity
impl<'__de> PlatformVersionedBorrowDecode<'__de> for Identity
§fn platform_versioned_borrow_decode<__D>(
decoder: &mut __D,
platform_version: &PlatformVersion,
) -> Result<Identity, DecodeError>where
__D: BorrowDecoder<'__de>,
fn platform_versioned_borrow_decode<__D>(
decoder: &mut __D,
platform_version: &PlatformVersion,
) -> Result<Identity, DecodeError>where
__D: BorrowDecoder<'__de>,
§impl PlatformVersionedDecode for Identity
impl PlatformVersionedDecode for Identity
§fn platform_versioned_decode<__D>(
decoder: &mut __D,
platform_version: &PlatformVersion,
) -> Result<Identity, DecodeError>where
__D: Decoder,
fn platform_versioned_decode<__D>(
decoder: &mut __D,
platform_version: &PlatformVersion,
) -> Result<Identity, DecodeError>where
__D: Decoder,
source§impl<S: Signer> PutIdentity<S> for Identity
impl<S: Signer> PutIdentity<S> for Identity
source§fn put_to_platform<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_private_key: &'life2 PrivateKey,
signer: &'life3 S,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_to_platform<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_private_key: &'life2 PrivateKey,
signer: &'life3 S,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
source§fn put_to_platform_and_wait_for_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_private_key: &'life2 PrivateKey,
signer: &'life3 S,
) -> Pin<Box<dyn Future<Output = Result<Identity, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_to_platform_and_wait_for_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_private_key: &'life2 PrivateKey,
signer: &'life3 S,
) -> Pin<Box<dyn Future<Output = Result<Identity, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
§impl Serialize for Identity
impl Serialize for Identity
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TopUpIdentity for Identity
impl TopUpIdentity for Identity
fn top_up_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
asset_lock_proof: AssetLockProof,
asset_lock_proof_private_key: &'life2 PrivateKey,
user_fee_increase: Option<UserFeeIncrease>,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
§impl<'a> ValueConvertible<'a> for Identity
impl<'a> ValueConvertible<'a> for Identity
fn to_object(&self) -> Result<Value, ProtocolError>
fn into_object(self) -> Result<Value, ProtocolError>where
Self: Sized,
fn from_object(value: Value) -> Result<Self, ProtocolError>where
Self: Sized,
fn from_object_ref(value: &Value) -> Result<Self, ProtocolError>where
Self: Sized,
source§impl WithdrawFromIdentity for Identity
impl WithdrawFromIdentity for Identity
source§fn withdraw<'life0, 'life1, 'async_trait, S>(
&'life0 self,
sdk: &'life1 Sdk,
address: Address,
amount: u64,
core_fee_per_byte: Option<u32>,
user_fee_increase: Option<UserFeeIncrease>,
signer: S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
S: 'async_trait + Signer + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn withdraw<'life0, 'life1, 'async_trait, S>(
&'life0 self,
sdk: &'life1 Sdk,
address: Address,
amount: u64,
core_fee_per_byte: Option<u32>,
user_fee_increase: Option<UserFeeIncrease>,
signer: S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
S: 'async_trait + Signer + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> CostsExt for T
impl<T> CostsExt for T
§fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
CostContext
object with provided costs.§fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
CostContext
object with costs computed using the
value getting wrapped.§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.