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_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
sourceunsafe fn version_rebase(&self, _: VersionName<'_>) -> Result<()>
unsafe fn version_rebase(&self, _: VersionName<'_>) -> Result<()>
Merge all changes made by new versions after the base version into the base version. Read more
sourceunsafe fn version_rebase_by_branch(
&self,
_: VersionName<'_>,
_: BranchName<'_>
) -> Result<()>
unsafe fn version_rebase_by_branch(
&self,
_: VersionName<'_>,
_: BranchName<'_>
) -> Result<()>
Merge all changes made by new versions after the base version into the base version. Read more
fn version_exists_globally(&self, _: VersionName<'_>) -> bool
sourcefn version_list(&self) -> Result<Vec<VersionNameOwned>>
fn version_list(&self) -> Result<Vec<VersionNameOwned>>
NOTE Read more
sourcefn version_list_by_branch(
&self,
_: BranchName<'_>
) -> Result<Vec<VersionNameOwned>>
fn version_list_by_branch(
&self,
_: BranchName<'_>
) -> Result<Vec<VersionNameOwned>>
NOTE Read more
sourcefn version_list_globally(&self) -> Vec<VersionNameOwned>
fn version_list_globally(&self) -> Vec<VersionNameOwned>
NOTE Read more
fn version_has_change_set(&self, _: VersionName<'_>) -> Result<bool>
fn version_clean_up_globally(&self) -> Result<()>
sourceunsafe fn version_revert_globally(&self, _: VersionName<'_>) -> Result<()>
unsafe fn version_revert_globally(&self, _: VersionName<'_>) -> Result<()>
Safety Read more
sourcefn branch_create(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
fn branch_create(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
Create a new branch based on the head of the default branch.
sourcefn branch_create_by_base_branch(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: ParentBranchName<'_>,
_: bool
) -> Result<()>
fn branch_create_by_base_branch(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: ParentBranchName<'_>,
_: bool
) -> Result<()>
Create a new branch based on the head of a specified branch.
sourcefn branch_create_by_base_branch_version(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
fn branch_create_by_base_branch_version(
&self,
_: BranchName<'_>,
_: VersionName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
Create a new branch based on a specified version of a specified branch.
sourceunsafe fn branch_create_without_new_version(
&self,
_: BranchName<'_>,
_: bool
) -> Result<()>
unsafe fn branch_create_without_new_version(
&self,
_: BranchName<'_>,
_: bool
) -> Result<()>
Safety Read more
sourceunsafe fn branch_create_by_base_branch_without_new_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: bool
) -> Result<()>
unsafe fn branch_create_by_base_branch_without_new_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: bool
) -> Result<()>
Safety Read more
sourceunsafe fn branch_create_by_base_branch_version_without_new_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
unsafe fn branch_create_by_base_branch_version_without_new_version(
&self,
_: BranchName<'_>,
_: ParentBranchName<'_>,
_: VersionName<'_>,
_: bool
) -> Result<()>
Safety Read more
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(&self, _: BranchName<'_>, _: BranchName<'_>) -> Result<()>
fn branch_merge_to(&self, _: BranchName<'_>, _: BranchName<'_>) -> Result<()>
Merge a branch into another.
sourceunsafe fn branch_merge_to_force(
&self,
_: BranchName<'_>,
_: BranchName<'_>
) -> Result<()>
unsafe fn branch_merge_to_force(
&self,
_: BranchName<'_>,
_: BranchName<'_>
) -> Result<()>
Merge a branch into another, even if new different versions have been created on the target branch. Read more
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
fn branch_is_empty(&self, _: BranchName<'_>) -> Result<bool>
sourcefn branch_list(&self) -> Vec<BranchNameOwned>
fn branch_list(&self) -> Vec<BranchNameOwned>
NOTE Read more
fn branch_get_default(&self) -> BranchNameOwned
sourceunsafe fn branch_swap(
&mut self,
_: BranchName<'_>,
_: BranchName<'_>
) -> Result<()>
unsafe fn branch_swap(
&mut self,
_: BranchName<'_>,
_: BranchName<'_>
) -> Result<()>
Logically similar to std::ptr::swap Read more
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