pub enum Document {
V0(DocumentV0),
}
Variants§
V0(DocumentV0)
Implementations§
§impl Document
impl Document
pub fn generate_document_id_v0(
contract_id: &Identifier,
owner_id: &Identifier,
document_type_name: &str,
entropy: &[u8],
) -> Identifier
pub fn generate_document_id_v0( contract_id: &Identifier, owner_id: &Identifier, document_type_name: &str, entropy: &[u8], ) -> Identifier
Generates the document ID
Trait Implementations§
§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Document, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Document, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl DocumentCborMethodsV0 for Document
impl DocumentCborMethodsV0 for Document
§fn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn from_cbor( document_cbor: &[u8], document_id: Option<[u8; 32]>, owner_id: Option<[u8; 32]>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
fn to_cbor_value(&self) -> Result<Value, ProtocolError>
§impl DocumentFromCreateTransition for Document
impl DocumentFromCreateTransition for Document
§fn try_from_create_transition(
document_create_transition: &DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_create_transition( document_create_transition: &DocumentCreateTransition, owner_id: Identifier, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentCreateTransition
reference, owner_id
, and additional metadata. Read more§fn try_from_owned_create_transition(
document_create_transition: DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_owned_create_transition( document_create_transition: DocumentCreateTransition, owner_id: Identifier, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentCreateTransition
instance, owner_id
, and additional metadata. Read more§impl DocumentFromCreateTransitionV0 for Document
impl DocumentFromCreateTransitionV0 for Document
§fn try_from_owned_create_transition_v0(
v0: DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_owned_create_transition_v0( v0: DocumentCreateTransitionV0, owner_id: Identifier, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentCreateTransitionV0
instance, incorporating additional metadata such as ownership and block information. Read more§fn try_from_create_transition_v0(
v0: &DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_create_transition_v0( v0: &DocumentCreateTransitionV0, owner_id: Identifier, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentCreateTransitionV0
reference, incorporating additional metadata like ownership and block information. Read more§impl DocumentFromReplaceTransition for Document
impl DocumentFromReplaceTransition for Document
§fn try_from_replace_transition(
document_replace_transition: &DocumentReplaceTransition,
owner_id: Identifier,
created_at: Option<u64>,
created_at_block_height: Option<u64>,
created_at_core_block_height: Option<u32>,
transferred_at: Option<u64>,
transferred_at_block_height: Option<u64>,
transferred_at_core_block_height: Option<u32>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_replace_transition( document_replace_transition: &DocumentReplaceTransition, owner_id: Identifier, created_at: Option<u64>, created_at_block_height: Option<u64>, created_at_core_block_height: Option<u32>, transferred_at: Option<u64>, transferred_at_block_height: Option<u64>, transferred_at_core_block_height: Option<u32>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentReplaceTransition
reference, incorporating owner_id
, creation metadata, and additional blockchain-related information. Read more§fn try_from_owned_replace_transition(
document_replace_transition: DocumentReplaceTransition,
owner_id: Identifier,
created_at: Option<u64>,
created_at_block_height: Option<u64>,
created_at_core_block_height: Option<u32>,
transferred_at: Option<u64>,
transferred_at_block_height: Option<u64>,
transferred_at_core_block_height: Option<u32>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_owned_replace_transition( document_replace_transition: DocumentReplaceTransition, owner_id: Identifier, created_at: Option<u64>, created_at_block_height: Option<u64>, created_at_core_block_height: Option<u32>, transferred_at: Option<u64>, transferred_at_block_height: Option<u64>, transferred_at_core_block_height: Option<u32>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentReplaceTransition
instance, incorporating owner_id
, creation metadata, and additional blockchain-related information. Read more§impl DocumentFromReplaceTransitionV0 for Document
impl DocumentFromReplaceTransitionV0 for Document
§fn try_from_replace_transition_v0(
value: &DocumentReplaceTransitionV0,
owner_id: Identifier,
created_at: Option<u64>,
created_at_block_height: Option<u64>,
created_at_core_block_height: Option<u32>,
transferred_at: Option<u64>,
transferred_at_block_height: Option<u64>,
transferred_at_core_block_height: Option<u32>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_replace_transition_v0( value: &DocumentReplaceTransitionV0, owner_id: Identifier, created_at: Option<u64>, created_at_block_height: Option<u64>, created_at_core_block_height: Option<u32>, transferred_at: Option<u64>, transferred_at_block_height: Option<u64>, transferred_at_core_block_height: Option<u32>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentReplaceTransitionV0
reference. This operation is typically used to replace or update an existing document with new information. Read more§fn try_from_owned_replace_transition_v0(
value: DocumentReplaceTransitionV0,
owner_id: Identifier,
created_at: Option<u64>,
created_at_block_height: Option<u64>,
created_at_core_block_height: Option<u32>,
transferred_at: Option<u64>,
transferred_at_block_height: Option<u64>,
transferred_at_core_block_height: Option<u32>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn try_from_owned_replace_transition_v0( value: DocumentReplaceTransitionV0, owner_id: Identifier, created_at: Option<u64>, created_at_block_height: Option<u64>, created_at_core_block_height: Option<u32>, transferred_at: Option<u64>, transferred_at_block_height: Option<u64>, transferred_at_core_block_height: Option<u32>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Document
from the given DocumentReplaceTransitionV0
instance. This function is similar to try_from_replace_transition_v0
but consumes the DocumentReplaceTransitionV0
instance, making it suitable for scenarios where the transition is owned and should not be reused after document creation. Read more§impl DocumentMethodsV0 for Document
impl DocumentMethodsV0 for Document
§fn get_raw_for_contract(
&self,
key: &str,
document_type_name: &str,
contract: &DataContract,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Option<Vec<u8>>, ProtocolError>
fn get_raw_for_contract( &self, key: &str, document_type_name: &str, contract: &DataContract, owner_id: Option<[u8; 32]>, platform_version: &PlatformVersion, ) -> Result<Option<Vec<u8>>, ProtocolError>
Return a value given the path to its key and the document type for a contract.
§fn get_raw_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Option<Vec<u8>>, ProtocolError>
fn get_raw_for_document_type( &self, key_path: &str, document_type: DocumentTypeRef<'_>, owner_id: Option<[u8; 32]>, platform_version: &PlatformVersion, ) -> Result<Option<Vec<u8>>, ProtocolError>
Return a value given the path to its key for a document type.
fn hash( &self, contract: &DataContract, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Vec<u8>, ProtocolError>
fn increment_revision(&mut self) -> Result<(), ProtocolError>
§fn is_equal_ignoring_time_based_fields(
&self,
rhs: &Document,
also_ignore_fields: Option<Vec<&str>>,
platform_version: &PlatformVersion,
) -> Result<bool, ProtocolError>
fn is_equal_ignoring_time_based_fields( &self, rhs: &Document, also_ignore_fields: Option<Vec<&str>>, platform_version: &PlatformVersion, ) -> Result<bool, ProtocolError>
§impl DocumentPlatformConversionMethodsV0 for Document
impl DocumentPlatformConversionMethodsV0 for Document
§fn serialize(
&self,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Vec<u8>, ProtocolError>
fn serialize( &self, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Vec<u8>, ProtocolError>
Serializes the document.
The serialization of a document follows the pattern: id 32 bytes + owner_id 32 bytes + encoded values byte arrays
§fn serialize_consume(
self,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Vec<u8>, ProtocolError>
fn serialize_consume( self, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Vec<u8>, ProtocolError>
Serializes and consumes the document.
The serialization of a document follows the pattern: id 32 bytes + owner_id 32 bytes + encoded values byte arrays
§fn from_bytes(
serialized_document: &[u8],
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn from_bytes( serialized_document: &[u8], document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Reads a serialized document and creates a Document from it.
§fn serialize_specific_version(
&self,
document_type: DocumentTypeRef<'_>,
feature_version: u16,
) -> Result<Vec<u8>, ProtocolError>
fn serialize_specific_version( &self, document_type: DocumentTypeRef<'_>, feature_version: u16, ) -> Result<Vec<u8>, ProtocolError>
§fn from_bytes_in_consensus(
serialized_document: &[u8],
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<ValidationResult<Document, ConsensusError>, ProtocolError>
fn from_bytes_in_consensus( serialized_document: &[u8], document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<ValidationResult<Document, ConsensusError>, ProtocolError>
§impl<'a> DocumentPlatformValueMethodsV0<'a> for Document
impl<'a> DocumentPlatformValueMethodsV0<'a> for Document
§fn to_map_value(&self) -> Result<BTreeMap<String, Value>, ProtocolError>
fn to_map_value(&self) -> Result<BTreeMap<String, Value>, ProtocolError>
Convert the document to a map value.
§fn into_map_value(self) -> Result<BTreeMap<String, Value>, ProtocolError>
fn into_map_value(self) -> Result<BTreeMap<String, Value>, ProtocolError>
Convert the document to a map value consuming the document.
§fn into_value(self) -> Result<Value, ProtocolError>
fn into_value(self) -> Result<Value, ProtocolError>
Convert the document to a value consuming the document.
§fn from_platform_value(
document_value: Value,
platform_version: &PlatformVersion,
) -> Result<Document, ProtocolError>
fn from_platform_value( document_value: Value, platform_version: &PlatformVersion, ) -> Result<Document, ProtocolError>
Create a document from a platform value.
§impl DocumentV0Getters for Document
impl DocumentV0Getters for Document
§fn id(&self) -> Identifier
fn id(&self) -> Identifier
fn id_ref(&self) -> &Identifier
§fn owner_id(&self) -> Identifier
fn owner_id(&self) -> Identifier
fn owner_id_ref(&self) -> &Identifier
§fn properties(&self) -> &BTreeMap<String, Value>
fn properties(&self) -> &BTreeMap<String, Value>
§fn properties_mut(&mut self) -> &mut BTreeMap<String, Value>
fn properties_mut(&mut self) -> &mut BTreeMap<String, Value>
fn properties_consumed(self) -> BTreeMap<String, Value>
§fn created_at(&self) -> Option<u64>
fn created_at(&self) -> Option<u64>
§fn updated_at(&self) -> Option<u64>
fn updated_at(&self) -> Option<u64>
§fn transferred_at(&self) -> Option<u64>
fn transferred_at(&self) -> Option<u64>
fn created_at_block_height(&self) -> Option<u64>
fn updated_at_block_height(&self) -> Option<u64>
fn transferred_at_block_height(&self) -> Option<u64>
fn created_at_core_block_height(&self) -> Option<u32>
fn updated_at_core_block_height(&self) -> Option<u32>
fn transferred_at_core_block_height(&self) -> Option<u32>
§impl DocumentV0Setters for Document
impl DocumentV0Setters for Document
§fn set_id(&mut self, id: Identifier)
fn set_id(&mut self, id: Identifier)
§fn set_owner_id(&mut self, owner_id: Identifier)
fn set_owner_id(&mut self, owner_id: Identifier)
§fn set_properties(&mut self, properties: BTreeMap<String, Value>)
fn set_properties(&mut self, properties: BTreeMap<String, Value>)
§fn set_revision(&mut self, revision: Option<u64>)
fn set_revision(&mut self, revision: Option<u64>)
fn bump_revision(&mut self)
§fn set_created_at(&mut self, created_at: Option<u64>)
fn set_created_at(&mut self, created_at: Option<u64>)
§fn set_updated_at(&mut self, updated_at: Option<u64>)
fn set_updated_at(&mut self, updated_at: Option<u64>)
fn set_transferred_at(&mut self, transferred_at: Option<u64>)
fn set_created_at_block_height(&mut self, created_at_block_height: Option<u64>)
fn set_updated_at_block_height(&mut self, updated_at_block_height: Option<u64>)
fn set_transferred_at_block_height( &mut self, transferred_at_block_height: Option<u64>, )
fn set_created_at_core_block_height( &mut self, created_at_core_block_height: Option<u32>, )
fn set_updated_at_core_block_height( &mut self, updated_at_core_block_height: Option<u32>, )
fn set_transferred_at_core_block_height( &mut self, transferred_at_core_block_height: Option<u32>, )
§fn set(&mut self, path: &str, value: Value)
fn set(&mut self, path: &str, value: Value)
lodash
JS library. Example: “root.people[0].name”.
If parents are not present, they will be automatically created.§fn remove(&mut self, path: &str) -> Option<Value>
fn remove(&mut self, path: &str) -> Option<Value>
lodash
JS library. Example: “root.people[0].name”.
If parents are not present, they will be automatically created.§fn set_u8(&mut self, property_name: &str, value: u8)
fn set_u8(&mut self, property_name: &str, value: u8)
u8
value for the specified property name.§fn set_i8(&mut self, property_name: &str, value: i8)
fn set_i8(&mut self, property_name: &str, value: i8)
i8
value for the specified property name.§fn set_u16(&mut self, property_name: &str, value: u16)
fn set_u16(&mut self, property_name: &str, value: u16)
u16
value for the specified property name.§fn set_i16(&mut self, property_name: &str, value: i16)
fn set_i16(&mut self, property_name: &str, value: i16)
i16
value for the specified property name.§fn set_u32(&mut self, property_name: &str, value: u32)
fn set_u32(&mut self, property_name: &str, value: u32)
u32
value for the specified property name.§fn set_i32(&mut self, property_name: &str, value: i32)
fn set_i32(&mut self, property_name: &str, value: i32)
i32
value for the specified property name.§fn set_u64(&mut self, property_name: &str, value: u64)
fn set_u64(&mut self, property_name: &str, value: u64)
u64
value for the specified property name.source§impl Fetch for Document
impl Fetch for Document
§type Request = DocumentQuery
type Request = DocumentQuery
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§impl FetchMany<Identifier, BTreeMap<Identifier, Option<Document>>> for Document
impl FetchMany<Identifier, BTreeMap<Identifier, Option<Document>>> for Document
Fetch documents from Platform.
Returns Documents indexed by their Identifier.
§Supported query types
- DriveQuery - query that specifies document matching criteria
- DocumentQuery
§type Request = DocumentQuery
type Request = DocumentQuery
source§fn fetch_many<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
) -> Pin<Box<dyn Future<Output = Result<Documents, Error>> + Send + 'async_trait>>where
Q: 'async_trait + Query<<Self as FetchMany<Identifier, Documents>>::Request>,
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_many<'life0, 'async_trait, Q>(
sdk: &'life0 Sdk,
query: Q,
) -> Pin<Box<dyn Future<Output = Result<Documents, Error>> + Send + 'async_trait>>where
Q: 'async_trait + Query<<Self as FetchMany<Identifier, Documents>>::Request>,
Self: 'async_trait,
'life0: 'async_trait,
source§impl FromProof<DocumentQuery> for Document
impl FromProof<DocumentQuery> for Document
§type Request = DocumentQuery
type Request = DocumentQuery
§type Response = GetDocumentsResponse
type Response = GetDocumentsResponse
source§fn maybe_from_proof_with_metadata<'a, I: Into<Self::Request>, O: Into<Self::Response>>(
request: I,
response: O,
network: Network,
platform_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,
platform_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 Length for Document
impl Length for Document
§fn count_some(&self) -> usize
fn count_some(&self) -> usize
source§impl MockResponse for Document
impl MockResponse for Document
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,
source§impl<S: Signer> PurchaseDocument<S> for Document
impl<S: Signer> PurchaseDocument<S> for Document
source§fn purchase_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
purchaser_id: Identifier,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn purchase_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
purchaser_id: Identifier,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
None
sets default connection behaviorsource§fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn purchase_document_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
purchaser_id: Identifier,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn purchase_document_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
purchaser_id: Identifier,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
source§impl<S: Signer> PutDocument<S> for Document
impl<S: Signer> PutDocument<S> for Document
source§fn put_to_platform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
document_type: DocumentType,
document_state_transition_entropy: [u8; 32],
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_to_platform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
document_type: DocumentType,
document_state_transition_entropy: [u8; 32],
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
None
sets default connection behaviorsource§fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn put_to_platform_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
document_type: DocumentType,
document_state_transition_entropy: [u8; 32],
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_to_platform_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
document_type: DocumentType,
document_state_transition_entropy: [u8; 32],
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
§impl Serialize for Document
impl Serialize for Document
§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<S: Signer> TransferDocument<S> for Document
impl<S: Signer> TransferDocument<S> for Document
source§fn transfer_document_to_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient_id: Identifier,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_document_to_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient_id: Identifier,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
None
sets default connection behaviorsource§fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn transfer_document_to_identity_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient_id: Identifier,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transfer_document_to_identity_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient_id: Identifier,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
source§impl<S: Signer> UpdatePriceOfDocument<S> for Document
impl<S: Signer> UpdatePriceOfDocument<S> for Document
source§fn update_price_of_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_price_of_document<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
signer: &'life2 S,
settings: Option<PutSettings>,
) -> Pin<Box<dyn Future<Output = Result<StateTransition, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
None
sets default connection behaviorsource§fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_response<'life0, 'life1, 'async_trait>(
&'life0 self,
sdk: &'life1 Sdk,
state_transition: StateTransition,
data_contract: Arc<DataContract>,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn update_price_of_document_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_price_of_document_and_wait_for_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
price: Credits,
sdk: &'life1 Sdk,
document_type: DocumentType,
identity_public_key: IdentityPublicKey,
data_contract: Arc<DataContract>,
signer: &'life2 S,
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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.