pub struct ObjectMapPath { /* private fields */ }Implementations§
Source§impl ObjectMapPath
impl ObjectMapPath
pub fn new( root: ObjectId, obj_map_cache: ObjectMapOpEnvCacheRef, enable_transaction: bool, ) -> Self
pub fn root(&self) -> ObjectId
pub fn update_root( &self, root_id: ObjectId, prev_id: &ObjectId, ) -> BuckyResult<()>
pub async fn metadata(&self, path: &str) -> BuckyResult<ObjectMapMetaData>
pub async fn list(&self, path: &str) -> BuckyResult<ObjectMapContentList>
pub fn parse_path_allow_empty_key(full_path: &str) -> BuckyResult<(&str, &str)>
pub fn parse_full_path(full_path: &str) -> BuckyResult<(&str, &str)>
pub async fn get_by_path( &self, full_path: &str, ) -> BuckyResult<Option<ObjectId>>
pub async fn create_new_with_path( &self, full_path: &str, content_type: ObjectMapSimpleContentType, ) -> BuckyResult<()>
pub async fn insert_with_path( &self, full_path: &str, value: &ObjectId, ) -> BuckyResult<()>
pub async fn set_with_path( &self, full_path: &str, value: &ObjectId, prev_value: &Option<ObjectId>, auto_insert: bool, ) -> BuckyResult<Option<ObjectId>>
pub async fn remove_with_path( &self, full_path: &str, prev_value: &Option<ObjectId>, ) -> BuckyResult<Option<ObjectId>>
pub async fn create_new( &self, path: &str, key: &str, content_type: ObjectMapSimpleContentType, ) -> BuckyResult<()>
pub async fn get_by_key( &self, path: &str, key: &str, ) -> BuckyResult<Option<ObjectId>>
pub async fn insert_with_key( &self, path: &str, key: &str, value: &ObjectId, ) -> BuckyResult<()>
pub async fn set_with_key( &self, path: &str, key: &str, value: &ObjectId, prev_value: &Option<ObjectId>, auto_insert: bool, ) -> BuckyResult<Option<ObjectId>>
pub async fn remove_with_key( &self, path: &str, key: &str, prev_value: &Option<ObjectId>, ) -> BuckyResult<Option<ObjectId>>
pub async fn contains( &self, path: &str, object_id: &ObjectId, ) -> BuckyResult<bool>
pub async fn insert( &self, path: &str, object_id: &ObjectId, ) -> BuckyResult<bool>
pub async fn remove( &self, path: &str, object_id: &ObjectId, ) -> BuckyResult<bool>
pub fn clear_op_list(&self)
pub async fn commit_op_list(&self) -> BuckyResult<()>
Auto Trait Implementations§
impl Freeze for ObjectMapPath
impl !RefUnwindSafe for ObjectMapPath
impl Send for ObjectMapPath
impl Sync for ObjectMapPath
impl Unpin for ObjectMapPath
impl UnsafeUnpin for ObjectMapPath
impl !UnwindSafe for ObjectMapPath
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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