pub trait DocumentMethodsV0 {
// Required methods
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_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_array_elements_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Vec<Vec<u8>>, ProtocolError>;
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: &Self,
also_ignore_fields: Option<Vec<&str>>,
platform_version: &PlatformVersion,
) -> Result<bool, ProtocolError>;
}Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn get_raw_array_elements_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<Vec<Vec<u8>>, ProtocolError>
fn get_raw_array_elements_for_document_type( &self, key_path: &str, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Vec<Vec<u8>>, ProtocolError>
The distinct index keys of the elements of the typed array at key_path, sorted: the
keys an index naming the array enters the document under.
fn hash( &self, contract: &DataContract, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<Vec<u8>, ProtocolError>
fn increment_revision(&mut self) -> Result<(), ProtocolError>
Sourcefn 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>
Checks to see if a document is equal without time based fields. Since these fields are set on the network this function can be useful to make sure that fields that were supplied have not changed, while ignoring those that are set network side. Time based fields that are ignored are created_at/updated_at created_at_block_height/updated_at_block_height created_at_core_block_height/updated_at_core_block_height
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".