[−][src]Enum bimap::Overwritten
The previous left-right pairs, if any, that were overwritten by a call to
the insert
method of a bimap.
Variants
Neither the left nor the right value previously existed in the bimap.
The left value existed in the bimap, and the previous left-right pair is returned.
The right value existed in the bimap, and the previous left-right pair is returned.
The left-right pair already existed in the bimap, and the previous left-right pair is returned.
Both the left and the right value existed in the bimap, but as part of separate pairs. The first tuple is the left-right pair of the previous left value, and the second is the left-right pair of the previous right value.
Implementations
impl<L, R> Overwritten<L, R>
[src]
pub fn did_overwrite(&self) -> bool
[src]
Returns a boolean indicating if the Overwritten
variant implies any
values were overwritten.
This method is true
for all variants other than Neither
.
Examples
use bimap::{BiMap, Overwritten}; let mut bimap = BiMap::new(); assert!(!bimap.insert('a', 1).did_overwrite()); assert!(bimap.insert('a', 2).did_overwrite());
Trait Implementations
impl<L: Clone, R: Clone> Clone for Overwritten<L, R>
[src]
fn clone(&self) -> Overwritten<L, R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<L: Copy, R: Copy> Copy for Overwritten<L, R>
[src]
impl<L: Debug, R: Debug> Debug for Overwritten<L, R>
[src]
impl<L: Eq, R: Eq> Eq for Overwritten<L, R>
[src]
impl<L: Hash, R: Hash> Hash for Overwritten<L, R>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<L: PartialEq, R: PartialEq> PartialEq<Overwritten<L, R>> for Overwritten<L, R>
[src]
fn eq(&self, other: &Overwritten<L, R>) -> bool
[src]
fn ne(&self, other: &Overwritten<L, R>) -> bool
[src]
impl<L, R> StructuralEq for Overwritten<L, R>
[src]
impl<L, R> StructuralPartialEq for Overwritten<L, R>
[src]
Auto Trait Implementations
impl<L, R> RefUnwindSafe for Overwritten<L, R> where
L: RefUnwindSafe,
R: RefUnwindSafe,
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Overwritten<L, R> where
L: Send,
R: Send,
L: Send,
R: Send,
impl<L, R> Sync for Overwritten<L, R> where
L: Sync,
R: Sync,
L: Sync,
R: Sync,
impl<L, R> Unpin for Overwritten<L, R> where
L: Unpin,
R: Unpin,
L: Unpin,
R: Unpin,
impl<L, R> UnwindSafe for Overwritten<L, R> where
L: UnwindSafe,
R: UnwindSafe,
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,