pub enum Document {
V0(DocumentV0),
}Variants§
V0(DocumentV0)
Implementations§
Source§impl Document
impl Document
Sourcepub fn generate_document_id(
contract_id: &Identifier,
owner_id: &Identifier,
document_type_name: &str,
entropy: &[u8],
identity_contract_nonce: IdentityNonce,
platform_version: &PlatformVersion,
) -> Result<Identifier, ProtocolError>
pub fn generate_document_id( contract_id: &Identifier, owner_id: &Identifier, document_type_name: &str, entropy: &[u8], identity_contract_nonce: IdentityNonce, platform_version: &PlatformVersion, ) -> Result<Identifier, ProtocolError>
Derives the id of a document that is about to be created.
From generate_document_id version 1 the identity contract nonce of
the create transition is part of the id. A nonce is consumed at most
once per identity and contract, so an id can be produced at most once:
a document that was deleted can not be created again under the same
id with different content, and whatever referenced the id keeps
pointing at that one document or at nothing.
The id therefore only exists once the nonce of the create transition is known, and it changes if the transition is rebuilt with another nonce.
Sourcepub fn set_id_for_creation(
&mut self,
document_type: DocumentTypeRef<'_>,
entropy: &[u8; 32],
identity_contract_nonce: IdentityNonce,
platform_version: &PlatformVersion,
) -> Result<(), ProtocolError>
pub fn set_id_for_creation( &mut self, document_type: DocumentTypeRef<'_>, entropy: &[u8; 32], identity_contract_nonce: IdentityNonce, platform_version: &PlatformVersion, ) -> Result<(), ProtocolError>
Gives a document that is about to be created the id its create transition will carry, from the entropy and the identity contract nonce that transition is going to use.
A client that needs the id before it sends the document (to reference it from another document, or to act on it afterwards) assigns the nonce first and calls this. The create transition must then be built with the same entropy and nonce.
Sourcepub fn generate_document_id_sha256_blocks(
document_type_name: &str,
platform_version: &PlatformVersion,
) -> Result<u16, ProtocolError>
pub fn generate_document_id_sha256_blocks( document_type_name: &str, platform_version: &PlatformVersion, ) -> Result<u16, ProtocolError>
The number of SHA-256 blocks deriving the id takes, which is what validating the id of a create is billed for.
The entropy only id has always been billed as 2 blocks and stays so. The nonce derived id is billed by what the double SHA-256 really hashes: the padded preimage (longer than before by the domain tag and the nonce) plus the one block of the second pass over the 32 byte digest. That is 4 blocks for a document type name of up to 60 bytes and 5 beyond that.
Sourcepub fn document_id_depends_on_nonce(
platform_version: &PlatformVersion,
) -> Result<bool, ProtocolError>
pub fn document_id_depends_on_nonce( platform_version: &PlatformVersion, ) -> Result<bool, ProtocolError>
Whether the id of a new document depends on the identity contract nonce of its create transition. When it does, the id a document carries before its create transition is built is only a placeholder.
Sourcepub 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
Sourcepub fn generate_document_id_v1(
contract_id: &Identifier,
owner_id: &Identifier,
document_type_name: &str,
entropy: &[u8],
identity_contract_nonce: IdentityNonce,
) -> Identifier
pub fn generate_document_id_v1( contract_id: &Identifier, owner_id: &Identifier, document_type_name: &str, entropy: &[u8], identity_contract_nonce: IdentityNonce, ) -> Identifier
Generates the document ID from the entropy and the identity contract nonce of the create transition
Source§impl Document
impl Document
pub fn try_into_asset_unlock_base_transaction_info( &self, transaction_index: WithdrawalTransactionIndex, platform_version: &PlatformVersion, ) -> Result<AssetUnlockBaseTransactionInfo, ProtocolError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl DocumentCborMethodsV0 for Document
impl DocumentCborMethodsV0 for Document
Source§fn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn from_cbor(
document_cbor: &[u8],
document_id: Option<[u8; 32]>,
owner_id: Option<[u8; 32]>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn to_cbor_value(&self) -> Result<CborValue, ProtocolError>
Source§impl DocumentFromCreateTransition for Document
impl DocumentFromCreateTransition for Document
Source§fn try_from_create_transition(
document_create_transition: &DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn try_from_create_transition(
document_create_transition: &DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Document from the given DocumentCreateTransition reference, owner_id, and additional metadata. Read moreSource§fn try_from_owned_create_transition(
document_create_transition: DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn try_from_owned_create_transition(
document_create_transition: DocumentCreateTransition,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Document from the given DocumentCreateTransition instance, owner_id, and additional metadata. Read moreSource§impl DocumentFromCreateTransitionV0 for Document
impl DocumentFromCreateTransitionV0 for Document
Source§fn try_from_owned_create_transition_v0(
v0: DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn try_from_owned_create_transition_v0(
v0: DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Document from the given DocumentCreateTransitionV0 instance, incorporating additional metadata such as ownership and block information. Read moreSource§fn try_from_create_transition_v0(
v0: &DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn try_from_create_transition_v0(
v0: &DocumentCreateTransitionV0,
owner_id: Identifier,
block_info: &BlockInfo,
contract: &DataContract,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Document from the given DocumentCreateTransitionV0 reference, incorporating additional metadata like ownership and block information. Read moreSource§impl DocumentFromReplaceTransition for Document
impl DocumentFromReplaceTransition for Document
Source§fn try_from_replace_transition(
document_replace_transition: &DocumentReplaceTransition,
owner_id: Identifier,
created_at: Option<TimestampMillis>,
created_at_block_height: Option<BlockHeight>,
created_at_core_block_height: Option<CoreBlockHeight>,
transferred_at: Option<TimestampMillis>,
transferred_at_block_height: Option<BlockHeight>,
transferred_at_core_block_height: Option<CoreBlockHeight>,
creator_id: Option<Identifier>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
fn try_from_replace_transition( document_replace_transition: &DocumentReplaceTransition, owner_id: Identifier, created_at: Option<TimestampMillis>, created_at_block_height: Option<BlockHeight>, created_at_core_block_height: Option<CoreBlockHeight>, transferred_at: Option<TimestampMillis>, transferred_at_block_height: Option<BlockHeight>, transferred_at_core_block_height: Option<CoreBlockHeight>, creator_id: Option<Identifier>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Self, ProtocolError>
Document from the given DocumentReplaceTransition reference, incorporating owner_id, creation metadata, and additional blockchain-related information. Read moreSource§fn try_from_owned_replace_transition(
document_replace_transition: DocumentReplaceTransition,
owner_id: Identifier,
created_at: Option<TimestampMillis>,
created_at_block_height: Option<BlockHeight>,
created_at_core_block_height: Option<CoreBlockHeight>,
transferred_at: Option<TimestampMillis>,
transferred_at_block_height: Option<BlockHeight>,
transferred_at_core_block_height: Option<CoreBlockHeight>,
creator_id: Option<Identifier>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
fn try_from_owned_replace_transition( document_replace_transition: DocumentReplaceTransition, owner_id: Identifier, created_at: Option<TimestampMillis>, created_at_block_height: Option<BlockHeight>, created_at_core_block_height: Option<CoreBlockHeight>, transferred_at: Option<TimestampMillis>, transferred_at_block_height: Option<BlockHeight>, transferred_at_core_block_height: Option<CoreBlockHeight>, creator_id: Option<Identifier>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Self, ProtocolError>
Document from the given DocumentReplaceTransition instance, incorporating owner_id, creation metadata, and additional blockchain-related information. Read moreSource§impl DocumentFromReplaceTransitionV0 for Document
impl DocumentFromReplaceTransitionV0 for Document
Source§fn try_from_replace_transition_v0(
value: &DocumentReplaceTransitionV0,
owner_id: Identifier,
created_at: Option<TimestampMillis>,
created_at_block_height: Option<BlockHeight>,
created_at_core_block_height: Option<CoreBlockHeight>,
transferred_at: Option<TimestampMillis>,
transferred_at_block_height: Option<BlockHeight>,
transferred_at_core_block_height: Option<CoreBlockHeight>,
creator_id: Option<Identifier>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
fn try_from_replace_transition_v0( value: &DocumentReplaceTransitionV0, owner_id: Identifier, created_at: Option<TimestampMillis>, created_at_block_height: Option<BlockHeight>, created_at_core_block_height: Option<CoreBlockHeight>, transferred_at: Option<TimestampMillis>, transferred_at_block_height: Option<BlockHeight>, transferred_at_core_block_height: Option<CoreBlockHeight>, creator_id: Option<Identifier>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Self, ProtocolError>
Document from the given DocumentReplaceTransitionV0 reference. This operation is typically used to replace or update an existing document with new information. Read moreSource§fn try_from_owned_replace_transition_v0(
value: DocumentReplaceTransitionV0,
owner_id: Identifier,
created_at: Option<TimestampMillis>,
created_at_block_height: Option<BlockHeight>,
created_at_core_block_height: Option<CoreBlockHeight>,
transferred_at: Option<TimestampMillis>,
transferred_at_block_height: Option<BlockHeight>,
transferred_at_core_block_height: Option<CoreBlockHeight>,
creator_id: Option<Identifier>,
block_info: &BlockInfo,
document_type: &DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
fn try_from_owned_replace_transition_v0( value: DocumentReplaceTransitionV0, owner_id: Identifier, created_at: Option<TimestampMillis>, created_at_block_height: Option<BlockHeight>, created_at_core_block_height: Option<CoreBlockHeight>, transferred_at: Option<TimestampMillis>, transferred_at_block_height: Option<BlockHeight>, transferred_at_core_block_height: Option<CoreBlockHeight>, creator_id: Option<Identifier>, block_info: &BlockInfo, document_type: &DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Self, 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 moreSource§impl DocumentMethodsV0 for Document
impl DocumentMethodsV0 for Document
Source§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.
Source§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>
Source§fn is_equal_ignoring_time_based_fields(
&self,
rhs: &Self,
also_ignore_fields: Option<Vec<&str>>,
platform_version: &PlatformVersion,
) -> Result<bool, ProtocolError>
fn is_equal_ignoring_time_based_fields( &self, rhs: &Self, also_ignore_fields: Option<Vec<&str>>, platform_version: &PlatformVersion, ) -> Result<bool, ProtocolError>
Source§impl DocumentPlatformConversionMethodsV0 for Document
impl DocumentPlatformConversionMethodsV0 for Document
Source§fn serialize(
&self,
document_type: DocumentTypeRef<'_>,
data_contract: &DataContract,
platform_version: &PlatformVersion,
) -> Result<Vec<u8>, ProtocolError>
fn serialize( &self, document_type: DocumentTypeRef<'_>, data_contract: &DataContract, 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
Source§fn from_bytes(
serialized_document: &[u8],
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
fn from_bytes( serialized_document: &[u8], document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Self, ProtocolError>
Reads a serialized document and creates a Document from it.
Source§fn serialize_specific_version(
&self,
document_type: DocumentTypeRef<'_>,
data_contract: &DataContract,
feature_version: FeatureVersion,
) -> Result<Vec<u8>, ProtocolError>
fn serialize_specific_version( &self, document_type: DocumentTypeRef<'_>, data_contract: &DataContract, feature_version: FeatureVersion, ) -> Result<Vec<u8>, ProtocolError>
Source§fn from_bytes_in_consensus(
serialized_document: &[u8],
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<ConsensusValidationResult<Self>, ProtocolError>where
Self: Sized,
fn from_bytes_in_consensus(
serialized_document: &[u8],
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<ConsensusValidationResult<Self>, ProtocolError>where
Self: Sized,
Source§impl DocumentPlatformValueMethodsV0<'_> for Document
impl DocumentPlatformValueMethodsV0<'_> for Document
Source§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.
Source§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.
Source§impl DocumentV0Getters for Document
impl DocumentV0Getters for Document
Source§fn id(&self) -> Identifier
fn id(&self) -> Identifier
fn id_ref(&self) -> &Identifier
Source§fn owner_id(&self) -> Identifier
fn owner_id(&self) -> Identifier
fn owner_id_ref(&self) -> &Identifier
Source§fn properties(&self) -> &BTreeMap<String, Value>
fn properties(&self) -> &BTreeMap<String, Value>
Source§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>
Source§fn created_at(&self) -> Option<TimestampMillis>
fn created_at(&self) -> Option<TimestampMillis>
Source§fn updated_at(&self) -> Option<TimestampMillis>
fn updated_at(&self) -> Option<TimestampMillis>
Source§fn transferred_at(&self) -> Option<TimestampMillis>
fn transferred_at(&self) -> Option<TimestampMillis>
fn created_at_block_height(&self) -> Option<BlockHeight>
fn updated_at_block_height(&self) -> Option<BlockHeight>
fn transferred_at_block_height(&self) -> Option<BlockHeight>
fn created_at_core_block_height(&self) -> Option<CoreBlockHeight>
fn updated_at_core_block_height(&self) -> Option<CoreBlockHeight>
fn transferred_at_core_block_height(&self) -> Option<CoreBlockHeight>
fn creator_id(&self) -> Option<Identifier>
Source§fn contract_version(&self) -> Option<u32>
fn contract_version(&self) -> Option<u32>
None for pre-stamp documents.Source§fn moderated_at(&self) -> Option<TimestampMillis>
fn moderated_at(&self) -> Option<TimestampMillis>
Source§fn moderated_by(&self) -> Option<Identifier>
fn moderated_by(&self) -> Option<Identifier>
Source§impl DocumentV0Setters for Document
impl DocumentV0Setters for Document
Source§fn set_id(&mut self, id: Identifier)
fn set_id(&mut self, id: Identifier)
Source§fn set_owner_id(&mut self, owner_id: Identifier)
fn set_owner_id(&mut self, owner_id: Identifier)
Source§fn set_properties(&mut self, properties: BTreeMap<String, Value>)
fn set_properties(&mut self, properties: BTreeMap<String, Value>)
Source§fn set_revision(&mut self, revision: Option<Revision>)
fn set_revision(&mut self, revision: Option<Revision>)
fn bump_revision(&mut self)
Source§fn set_created_at(&mut self, created_at: Option<TimestampMillis>)
fn set_created_at(&mut self, created_at: Option<TimestampMillis>)
Source§fn set_updated_at(&mut self, updated_at: Option<TimestampMillis>)
fn set_updated_at(&mut self, updated_at: Option<TimestampMillis>)
fn set_transferred_at(&mut self, transferred_at: Option<TimestampMillis>)
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>, )
Source§fn set_creator_id(&mut self, creator_id: Option<Identifier>)
fn set_creator_id(&mut self, creator_id: Option<Identifier>)
Source§fn set_contract_version(&mut self, contract_version: Option<u32>)
fn set_contract_version(&mut self, contract_version: Option<u32>)
Source§fn set_moderated_at(&mut self, moderated_at: Option<TimestampMillis>)
fn set_moderated_at(&mut self, moderated_at: Option<TimestampMillis>)
Source§fn set_moderated_by(&mut self, moderated_by: Option<Identifier>)
fn set_moderated_by(&mut self, moderated_by: Option<Identifier>)
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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 From<DocumentV0> for Document
impl From<DocumentV0> for Document
Source§fn from(value: DocumentV0) -> Self
fn from(value: DocumentV0) -> Self
Source§impl JsonConvertible for Document
Available on crate features json-conversion and serde-conversion only.
impl JsonConvertible for Document
json-conversion and serde-conversion only.impl StructuralPartialEq for Document
Source§impl TryFrom<StateTransitionProofResult> for Document
impl TryFrom<StateTransitionProofResult> for Document
Source§type Error = TryIntoError<StateTransitionProofResult>
type Error = TryIntoError<StateTransitionProofResult>
Source§impl ValueConvertible for Document
Available on crate features serde-conversion and value-conversion only.
impl ValueConvertible for Document
serde-conversion and value-conversion only.fn to_object(&self) -> Result<Value, ProtocolError>where
Self: Sized,
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,
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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> ⓘ
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§impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
§fn into_on_network(self, network: Network) -> U
fn into_on_network(self, network: Network) -> U
Calls U::from_on_network(self).
§impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
§fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
§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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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.