DocumentInfoV0Methods

Trait DocumentInfoV0Methods 

Source
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§

Source

fn is_document_and_serialization(&self) -> bool

Returns true if self is a document with serialization.

Source

fn is_document_size(&self) -> bool

Returns true if self is a document size.

Source

fn get_borrowed_document(&self) -> Option<&Document>

Gets the borrowed document

Source

fn id_key_value_info(&self) -> KeyValueInfo<'_>

Makes the document ID the key.

Source

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

Source

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

Source

fn get_borrowed_document_and_storage_flags( &self, ) -> Option<(&Document, Option<&StorageFlags>)>

Gets the borrowed document

Source

fn get_storage_flags_ref(&self) -> Option<&StorageFlags>

Gets storage flags

Source

fn get_document_id_as_slice(&self) -> Option<&[u8]>

Gets storage flags

Implementors§