pub trait TransferDocument<S: Signer> {
// Required methods
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 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 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;
}
Expand description
A trait for transferring a document on Platform
Required Methods§
sourcefn 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,
Transfers a document on platform
Setting settings to None
sets default connection behavior
sourcefn 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,
Waits for the response of a state transition after it has been broadcast
sourcefn 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,
Transfers a document on platform and waits for the response