pub trait DocumentInfoV0Methods {
// Required methods
fn is_document_and_serialization(&self) -> bool;
fn is_document_size(&self) -> bool;
fn get_borrowed_document(&self) -> Option<&Document>;
fn id_key_value_info(&self) -> KeyValueInfo<'_>;
fn get_estimated_size_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<u16, Error>;
fn get_raw_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
owner_id: Option<[u8; 32]>,
size_info_with_base_event: Option<(&IndexLevel, [u8; 32])>,
platform_version: &PlatformVersion,
) -> Result<Option<DriveKeyInfo<'_>>, Error>;
fn get_borrowed_document_and_storage_flags(
&self,
) -> Option<(&Document, Option<&StorageFlags>)>;
fn get_storage_flags_ref(&self) -> Option<&StorageFlags>;
fn get_document_id_as_slice(&self) -> Option<&[u8]>;
}Expand description
DocumentInfo V0 Methods
Required Methods§
Sourcefn is_document_and_serialization(&self) -> bool
fn is_document_and_serialization(&self) -> bool
Returns true if self is a document with serialization.
Sourcefn is_document_size(&self) -> bool
fn is_document_size(&self) -> bool
Returns true if self is a document size.
Sourcefn get_borrowed_document(&self) -> Option<&Document>
fn get_borrowed_document(&self) -> Option<&Document>
Gets the borrowed document
Sourcefn id_key_value_info(&self) -> KeyValueInfo<'_>
fn id_key_value_info(&self) -> KeyValueInfo<'_>
Makes the document ID the key.
Sourcefn get_estimated_size_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
platform_version: &PlatformVersion,
) -> Result<u16, Error>
fn get_estimated_size_for_document_type( &self, key_path: &str, document_type: DocumentTypeRef<'_>, platform_version: &PlatformVersion, ) -> Result<u16, Error>
Gets the raw path for the given document type
Sourcefn get_raw_for_document_type(
&self,
key_path: &str,
document_type: DocumentTypeRef<'_>,
owner_id: Option<[u8; 32]>,
size_info_with_base_event: Option<(&IndexLevel, [u8; 32])>,
platform_version: &PlatformVersion,
) -> Result<Option<DriveKeyInfo<'_>>, Error>
fn get_raw_for_document_type( &self, key_path: &str, document_type: DocumentTypeRef<'_>, owner_id: Option<[u8; 32]>, size_info_with_base_event: Option<(&IndexLevel, [u8; 32])>, platform_version: &PlatformVersion, ) -> Result<Option<DriveKeyInfo<'_>>, Error>
Gets the raw path for the given document type
Sourcefn get_borrowed_document_and_storage_flags(
&self,
) -> Option<(&Document, Option<&StorageFlags>)>
fn get_borrowed_document_and_storage_flags( &self, ) -> Option<(&Document, Option<&StorageFlags>)>
Gets the borrowed document
Sourcefn get_storage_flags_ref(&self) -> Option<&StorageFlags>
fn get_storage_flags_ref(&self) -> Option<&StorageFlags>
Gets storage flags
Sourcefn get_document_id_as_slice(&self) -> Option<&[u8]>
fn get_document_id_as_slice(&self) -> Option<&[u8]>
Gets storage flags