ObjectMap

Type Alias ObjectMap 

Source
pub type ObjectMap = NamedObjectBase<ObjectMapType>;

Aliased Type§

pub struct ObjectMap { /* private fields */ }

Implementations§

Source§

impl ObjectMap

Source

pub fn new( content_type: ObjectMapSimpleContentType, owner: Option<ObjectId>, dec_id: Option<ObjectId>, ) -> ObjectMapBuilder

Source

pub fn count(&self) -> u64

Source

pub fn object_id(&self) -> ObjectId

Source

pub fn content_type(&self) -> ObjectMapSimpleContentType

Source

pub fn mode(&self) -> ObjectMapContentMode

Source

pub fn class(&self) -> ObjectMapClass

Source

pub fn depth(&self) -> u8

Source

pub fn metadata(&self) -> ObjectMapMetaData

Source

pub fn cached_object_id(&self) -> Option<ObjectId>

Source

pub fn direct_set_object_id_on_init(&self, object_id: &ObjectId)

Source

pub fn flush_id(&self) -> ObjectId

Source

pub fn flush_id_without_cache(&self) -> ObjectId

Source

pub async fn convert_to_simple( &mut self, cache: &ObjectMapOpEnvCacheRef, ) -> BuckyResult<()>

Source

pub async fn convert_to_hub( &mut self, cache: &ObjectMapOpEnvCacheRef, ) -> BuckyResult<()>

Source

pub fn into_simple(self) -> ObjectMapSimpleContent

Source

pub async fn get_or_create_child_object_map( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, content_type: ObjectMapSimpleContentType, auto_create: ObjectMapCreateStrategy, access: Option<AccessString>, ) -> BuckyResult<Option<ObjectMapRef>>

Source

pub async fn list( &self, cache: &ObjectMapOpEnvCacheRef, list: &mut ObjectMapContentList, ) -> BuckyResult<u64>

Source

pub async fn list_direct( &self, cache: &ObjectMapOpEnvCacheRef, ) -> BuckyResult<ObjectMapContentList>

Source

pub async fn list_subs( &self, cache: &ObjectMapOpEnvCacheRef, list: &mut Vec<ObjectId>, ) -> BuckyResult<u64>

Source

pub async fn next(&self, it: &mut ObjectMapIterator) -> BuckyResult<()>

Source

pub async fn get_by_key( &self, cache: &ObjectMapOpEnvCacheRef, key: &str, ) -> BuckyResult<Option<ObjectId>>

Source

pub async fn insert_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, value: &ObjectId, ) -> BuckyResult<()>

Source

pub async fn set_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, value: &ObjectId, prev_value: &Option<ObjectId>, auto_insert: bool, ) -> BuckyResult<Option<ObjectId>>

Source

pub async fn remove_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, prev_value: &Option<ObjectId>, ) -> BuckyResult<Option<ObjectId>>

Source

pub async fn diff_get_by_key( &self, cache: &ObjectMapOpEnvCacheRef, key: &str, ) -> BuckyResult<Option<ObjectMapDiffMapItem>>

Source

pub async fn diff_insert_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, value: &ObjectMapDiffMapItem, ) -> BuckyResult<()>

Source

pub async fn diff_set_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, value: &ObjectMapDiffMapItem, prev_value: &Option<ObjectMapDiffMapItem>, auto_insert: bool, ) -> BuckyResult<Option<ObjectMapDiffMapItem>>

Source

pub async fn diff_remove_with_key( &mut self, cache: &ObjectMapOpEnvCacheRef, key: &str, prev_value: &Option<ObjectMapDiffMapItem>, ) -> BuckyResult<Option<ObjectMapDiffMapItem>>

Source

pub async fn contains( &self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectId, ) -> BuckyResult<bool>

Source

pub async fn insert( &mut self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectId, ) -> BuckyResult<bool>

Source

pub async fn remove( &mut self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectId, ) -> BuckyResult<bool>

Source

pub async fn diff_contains( &self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectMapDiffSetItem, ) -> BuckyResult<bool>

Source

pub async fn diff_insert( &mut self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectMapDiffSetItem, ) -> BuckyResult<bool>

Source

pub async fn diff_remove( &mut self, cache: &ObjectMapOpEnvCacheRef, object_id: &ObjectMapDiffSetItem, ) -> BuckyResult<bool>

Source

pub async fn visit( &self, visitor: &mut impl ObjectMapVisitor, ) -> BuckyResult<()>