pub struct MapxVs<K, V> { /* private fields */ }Expand description
Documents => MapxRawVs
Implementations
sourceimpl<K, V> MapxVs<K, V> where
K: KeyEnDe,
V: ValueEnDe,
impl<K, V> MapxVs<K, V> where
K: KeyEnDe,
V: ValueEnDe,
pub fn new() -> Self
pub fn get(&self, key: &K) -> Option<V>
pub fn get_mut<'a>(&'a self, key: &'a K) -> Option<ValueMut<'a, K, V>>
pub fn entry_ref<'a>(&'a self, key: &'a K) -> Entry<'a, K, V>
pub fn get_le(&self, key: &K) -> Option<(K, V)>
pub fn get_ge(&self, key: &K) -> Option<(K, V)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn insert(&self, key: K, value: V) -> Result<Option<V>>
pub fn insert_ref(&self, key: &K, value: &V) -> Result<Option<V>>
pub fn iter(&self) -> MapxVsIter<'_, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn range<'a, R: 'a + RangeBounds<K>>(
&'a self,
bounds: R
) -> MapxVsIter<'a, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn first(&self) -> Option<(K, V)>
pub fn last(&self) -> Option<(K, V)>
pub fn contains_key(&self, key: &K) -> bool
pub fn remove(&self, key: &K) -> Result<Option<V>>
pub fn clear(&mut self)
pub fn get_by_branch(&self, key: &K, branch_name: BranchName<'_>) -> Option<V>
pub fn get_le_by_branch(
&self,
key: &K,
branch_name: BranchName<'_>
) -> Option<(K, V)>
pub fn get_ge_by_branch(
&self,
key: &K,
branch_name: BranchName<'_>
) -> Option<(K, V)>
pub fn len_by_branch(&self, branch_name: BranchName<'_>) -> usize
pub fn is_empty_by_branch(&self, branch_name: BranchName<'_>) -> bool
pub fn insert_by_branch(
&self,
key: K,
value: V,
branch_name: BranchName<'_>
) -> Result<Option<V>>
pub fn insert_ref_by_branch(
&self,
key: &K,
value: &V,
branch_name: BranchName<'_>
) -> Result<Option<V>>
pub fn iter_by_branch(
&self,
branch_name: BranchName<'_>
) -> MapxVsIter<'_, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn range_by_branch<'a, R: 'a + RangeBounds<K>>(
&'a self,
bounds: R,
branch_name: BranchName<'_>
) -> MapxVsIter<'a, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn first_by_branch(&self, branch_name: BranchName<'_>) -> Option<(K, V)>
pub fn last_by_branch(&self, branch_name: BranchName<'_>) -> Option<(K, V)>
pub fn contains_key_by_branch(
&self,
key: &K,
branch_name: BranchName<'_>
) -> bool
pub fn remove_by_branch(
&self,
key: &K,
branch_name: BranchName<'_>
) -> Result<Option<V>>
pub fn get_by_branch_version(
&self,
key: &K,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> Option<V>
pub fn get_le_by_branch_version(
&self,
key: &K,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> Option<(K, V)>
pub fn get_ge_by_branch_version(
&self,
key: &K,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> Option<(K, V)>
pub fn len_by_branch_version(
&self,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> usize
pub fn is_empty_by_branch_version(
&self,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> bool
pub fn iter_by_branch_version(
&self,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> MapxVsIter<'_, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn range_by_branch_version<'a, R: 'a + RangeBounds<K>>(
&'a self,
bounds: R,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> MapxVsIter<'a, K, V>ⓘNotable traits for MapxVsIter<'a, K, V>impl<'a, K, V> Iterator for MapxVsIter<'a, K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn first_by_branch_version(
&self,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> Option<(K, V)>
pub fn last_by_branch_version(
&self,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> Option<(K, V)>
pub fn contains_key_by_branch_version(
&self,
key: &K,
branch_name: BranchName<'_>,
version_name: VersionName<'_>
) -> bool
Trait Implementations
sourceimpl<'de, K, V> Deserialize<'de> for MapxVs<K, V>
impl<'de, K, V> Deserialize<'de> for MapxVs<K, V>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<K, V> VsMgmt for MapxVs<K, V> where
K: KeyEnDe,
V: ValueEnDe,
impl<K, V> VsMgmt for MapxVs<K, V> where
K: KeyEnDe,
V: ValueEnDe,
sourcefn version_create(&self, version_name: VersionName<'_>) -> Result<()>
fn version_create(&self, version_name: VersionName<'_>) -> Result<()>
Create a new version on the default branch.
sourcefn version_create_by_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> Result<()>
fn version_create_by_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> Result<()>
Create a new version on a specified branch, NOTE: the branch must has been created.
sourcefn version_exists(&self, version_name: VersionName<'_>) -> bool
fn version_exists(&self, version_name: VersionName<'_>) -> bool
Check if a verison exists on default branch.
sourcefn version_exists_on_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> bool
fn version_exists_on_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> bool
Check if a version exists on a specified branch(include its parents).
sourcefn version_created(&self, version_name: VersionName<'_>) -> bool
fn version_created(&self, version_name: VersionName<'_>) -> bool
Check if a version is directly created on the default branch.
sourcefn version_created_on_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> bool
fn version_created_on_branch(
&self,
version_name: VersionName<'_>,
branch_name: BranchName<'_>
) -> bool
Check if a version is directly created on a specified branch(exclude its parents).
sourcefn version_pop(&self) -> Result<()>
fn version_pop(&self) -> Result<()>
Remove the newest version on the default branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn version_pop_by_branch(&self, branch_name: BranchName<'_>) -> Result<()>
fn version_pop_by_branch(&self, branch_name: BranchName<'_>) -> Result<()>
Remove the newest version on a specified branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn branch_create(&self, branch_name: BranchName<'_>) -> Result<()>
fn branch_create(&self, branch_name: BranchName<'_>) -> Result<()>
Create a new branch based on the head of the default branch.
sourcefn branch_create_by_base_branch(
&self,
branch_name: BranchName<'_>,
base_branch_name: ParentBranchName<'_>
) -> Result<()>
fn branch_create_by_base_branch(
&self,
branch_name: BranchName<'_>,
base_branch_name: ParentBranchName<'_>
) -> Result<()>
Create a new branch based on the head of a specified branch.
sourcefn branch_create_by_base_branch_version(
&self,
branch_name: BranchName<'_>,
base_branch_name: ParentBranchName<'_>,
base_version_name: VersionName<'_>
) -> Result<()>
fn branch_create_by_base_branch_version(
&self,
branch_name: BranchName<'_>,
base_branch_name: ParentBranchName<'_>,
base_version_name: VersionName<'_>
) -> Result<()>
Create a new branch based on a specified version of a specified branch.
sourcefn branch_exists(&self, branch_name: BranchName<'_>) -> bool
fn branch_exists(&self, branch_name: BranchName<'_>) -> bool
Check if a branch exists or not.
sourcefn branch_remove(&self, branch_name: BranchName<'_>) -> Result<()>
fn branch_remove(&self, branch_name: BranchName<'_>) -> Result<()>
Remove a branch, remove all changes directly made by this branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn branch_truncate(&self, branch_name: BranchName<'_>) -> Result<()>
fn branch_truncate(&self, branch_name: BranchName<'_>) -> Result<()>
Remove all changes directly made by versions(bigger than last_version_id) of this branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn branch_truncate_to(
&self,
branch_name: BranchName<'_>,
last_version_name: VersionName<'_>
) -> Result<()>
fn branch_truncate_to(
&self,
branch_name: BranchName<'_>,
last_version_name: VersionName<'_>
) -> Result<()>
Remove all changes directly made by versions(bigger than last_version_id) of this branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn branch_pop_version(&self, branch_name: BranchName<'_>) -> Result<()>
fn branch_pop_version(&self, branch_name: BranchName<'_>) -> Result<()>
Remove the newest version on a specified branch.
‘Write’-like operations on branches and versions are different from operations on data.
‘Write’-like operations on data require recursive tracing of all parent nodes, while operations on branches and versions are limited to their own perspective, and should not do any tracing.
sourcefn branch_merge_to_parent(&self, branch_name: BranchName<'_>) -> Result<()>
fn branch_merge_to_parent(&self, branch_name: BranchName<'_>) -> Result<()>
Merge a branch to its parent branch.
sourcefn branch_has_children(&self, branch_name: BranchName<'_>) -> bool
fn branch_has_children(&self, branch_name: BranchName<'_>) -> bool
Check if a branch has children branches.
sourcefn branch_set_default(&mut self, branch_name: BranchName<'_>) -> Result<()>
fn branch_set_default(&mut self, branch_name: BranchName<'_>) -> Result<()>
Make a branch to be default, all default operations will be applied to it.
sourcefn prune(&self, reserved_ver_num: Option<usize>) -> Result<()>
fn prune(&self, reserved_ver_num: Option<usize>) -> Result<()>
Clean outdated versions out of the default reserved number.
sourcefn prune_by_branch(
&self,
branch_name: BranchName<'_>,
reserved_ver_num: Option<usize>
) -> Result<()>
fn prune_by_branch(
&self,
branch_name: BranchName<'_>,
reserved_ver_num: Option<usize>
) -> Result<()>
Clean outdated versions out of a specified reserved number.
impl<K: Eq, V: Eq> Eq for MapxVs<K, V>
impl<K, V> StructuralEq for MapxVs<K, V>
impl<K, V> StructuralPartialEq for MapxVs<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for MapxVs<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for MapxVs<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for MapxVs<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for MapxVs<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for MapxVs<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more