pub struct Mapx<K, V> { /* private fields */ }Implementations
sourceimpl<K, V> Mapx<K, V> where
K: KeyEnDe,
V: ValueEnDe,
impl<K, V> Mapx<K, V> where
K: KeyEnDe,
V: ValueEnDe,
pub fn new() -> Self
pub fn get(&self, key: &K) -> Option<V>
pub fn get_mut(&self, key: &K) -> Option<ValueMut<'_, V>>
pub fn contains_key(&self, key: &K) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn insert(&self, key: K, value: V) -> Option<V>
pub fn insert_ref(&self, key: &K, value: &V) -> Option<V>
pub fn set_value(&self, key: K, value: V)
pub fn set_value_ref(&self, key: &K, value: &V)
pub fn entry(&self, key: K) -> Entry<'_, V>
pub fn iter(&self) -> MapxIter<K, V>ⓘNotable traits for MapxIter<K, V>impl<K, V> Iterator for MapxIter<K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
K: KeyEnDe,
V: ValueEnDe, type Item = (K, V);
pub fn values(&self) -> MapxValues<K, V>ⓘNotable traits for MapxValues<K, V>impl<K, V> Iterator for MapxValues<K, V> where
K: KeyEnDe,
V: ValueEnDe, type Item = V;
K: KeyEnDe,
V: ValueEnDe, type Item = V;
pub fn remove(&self, key: &K) -> Option<V>
pub fn unset_value(&self, key: &K)
pub fn clear(&self)
Trait Implementations
sourceimpl<'de, K, V> Deserialize<'de> for Mapx<K, V>
impl<'de, K, V> Deserialize<'de> for Mapx<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 Mapx<K, V>
impl<K, V> VsMgmt for Mapx<K, V>
sourcefn version_create(&self, _: VersionName<'_>) -> Result<()>
fn version_create(&self, _: VersionName<'_>) -> Result<()>
Create a new version on the default branch.
sourcefn version_create_by_branch(
&self,
_: VersionName<'_>,
__: BranchName<'_>
) -> Result<()>
fn version_create_by_branch(
&self,
_: VersionName<'_>,
__: BranchName<'_>
) -> Result<()>
Create a new version on a specified branch, NOTE: the branch must has been created. Read more
sourcefn version_exists(&self, _: VersionName<'_>) -> bool
fn version_exists(&self, _: VersionName<'_>) -> bool
Check if a verison exists on default branch.
sourcefn version_exists_on_branch(
&self,
_: VersionName<'_>,
__: BranchName<'_>
) -> bool
fn version_exists_on_branch(
&self,
_: VersionName<'_>,
__: BranchName<'_>
) -> bool
Check if a version exists on a specified branch(include its parents).
sourcefn version_created(&self, _: VersionName<'_>) -> bool
fn version_created(&self, _: VersionName<'_>) -> bool
Check if a version is directly created on the default branch.
sourcefn version_created_on_branch(
&self,
_: VersionName<'_>,
_: BranchName<'_>
) -> bool
fn version_created_on_branch(
&self,
_: VersionName<'_>,
_: 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. Read more
sourcefn version_pop_by_branch(&self, _: BranchName<'_>) -> Result<()>
fn version_pop_by_branch(&self, _: BranchName<'_>) -> Result<()>
Remove the newest version on a specified branch. Read more
sourcefn version_rebase(&self, _: VersionName<'_>) -> Result<()>
fn version_rebase(&self, _: VersionName<'_>) -> Result<()>
Merge all changes made by new versions after the base version into the base version.
sourcefn version_rebase_by_branch(
&self,
_: VersionName<'_>,
_: BranchName<'_>
) -> Result<()>
fn version_rebase_by_branch(
&self,
_: VersionName<'_>,
_: BranchName<'_>
) -> Result<()>
Merge all changes made by new versions after the base version into the base version.
sourcefn branch_create(&self, _: BranchName<'_>) -> Result<()>
fn branch_create(&self, _: BranchName<'_>) -> Result<()>
Create a new branch based on the head of the default branch.
sourcefn branch_create_by_base_branch(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>
) -> Result<()>
fn branch_create_by_base_branch(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>
) -> Result<()>
Create a new branch based on the head of a specified branch.
sourcefn branch_create_by_base_branch_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>
) -> Result<()>
fn branch_create_by_base_branch_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>
) -> Result<()>
Create a new branch based on a specified version of a specified branch.
sourcefn branch_exists(&self, _: BranchName<'_>) -> bool
fn branch_exists(&self, _: BranchName<'_>) -> bool
Check if a branch exists or not.
sourcefn branch_has_versions(&self, _: BranchName<'_>) -> bool
fn branch_has_versions(&self, _: BranchName<'_>) -> bool
Check if a branch exists and has versions on it.
sourcefn branch_remove(&self, _: BranchName<'_>) -> Result<()>
fn branch_remove(&self, _: BranchName<'_>) -> Result<()>
Remove a branch, remove all changes directly made by this branch. Read more
sourcefn branch_truncate(&self, _: BranchName<'_>) -> Result<()>
fn branch_truncate(&self, _: BranchName<'_>) -> Result<()>
Remove all changes directly made by versions(bigger than last_version_id) of this branch. Read more
sourcefn branch_truncate_to(
&self,
_: BranchName<'_>,
_: VersionName<'_>
) -> Result<()>
fn branch_truncate_to(
&self,
_: BranchName<'_>,
_: VersionName<'_>
) -> Result<()>
Remove all changes directly made by versions(bigger than last_version_id) of this branch. Read more
sourcefn branch_pop_version(&self, _: BranchName<'_>) -> Result<()>
fn branch_pop_version(&self, _: BranchName<'_>) -> Result<()>
Remove the newest version on a specified branch. Read more
sourcefn branch_merge_to_parent(&self, _: BranchName<'_>) -> Result<()>
fn branch_merge_to_parent(&self, _: BranchName<'_>) -> Result<()>
Merge a branch to its parent branch. Read more
sourcefn branch_has_children(&self, _: BranchName<'_>) -> bool
fn branch_has_children(&self, _: BranchName<'_>) -> bool
Check if a branch has children branches.
sourcefn branch_set_default(&mut self, _: BranchName<'_>) -> Result<()>
fn branch_set_default(&mut self, _: BranchName<'_>) -> Result<()>
Make a branch to be default, all default operations will be applied to it. Read more
sourcefn prune(&self, _: Option<usize>) -> Result<()>
fn prune(&self, _: Option<usize>) -> Result<()>
Clean outdated versions out of the default branch.
sourcefn prune_by_branch(&self, _: BranchName<'_>, __: Option<usize>) -> Result<()>
fn prune_by_branch(&self, _: BranchName<'_>, __: Option<usize>) -> Result<()>
Clean outdated versions out of a specified branch.
impl<K: Copy, V: Copy> Copy for Mapx<K, V>
impl<K: Eq, V: Eq> Eq for Mapx<K, V>
impl<K, V> StructuralEq for Mapx<K, V>
impl<K, V> StructuralPartialEq for Mapx<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Mapx<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Mapx<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for Mapx<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for Mapx<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for Mapx<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 · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more