Struct yadf::TreeBag [−][src]
Counter structure.
Example :
use yadf::TreeBag; let bag: TreeBag<i32, &str> = vec![ (3, "hello world"), (3, "foobar"), (7, "fizz"), (7, "buzz"), (6, "rust"), ].into_iter().collect(); assert_eq!(bag.as_tree()[&3].len(), 2); assert_eq!(bag.as_tree()[&6].len(), 1); assert_eq!(bag.as_tree()[&3][0], "hello world");
Implementations
impl<H: Ord, T> TreeBag<H, T>
[src]
pub fn duplicates(&self) -> Replicates<'_, H, T>
[src]
Provides a view only on the buckets containing more than one element.
pub fn replicates(&self, factor: Factor) -> Replicates<'_, H, T>
[src]
pub fn as_tree(&self) -> &BTreeMap<H, Vec<T>>
[src]
Borrows the backing tree map of the bag
Trait Implementations
impl<H: Ord, T> AsRef<BTreeMap<H, Vec<T, Global>>> for TreeBag<H, T>
[src]
impl<H: Debug + Ord, T: Debug> Debug for TreeBag<H, T>
[src]
impl<H: Ord, T> From<BTreeMap<H, Vec<T, Global>>> for TreeBag<H, T>
[src]
impl<H: Ord, T> FromIterator<(H, T)> for TreeBag<H, T>
[src]
fn from_iter<I: IntoIterator<Item = (H, T)>>(iter: I) -> Self
[src]
impl<H, T> Serialize for TreeBag<H, T> where
H: Ord + Serialize,
T: Serialize,
[src]
H: Ord + Serialize,
T: Serialize,
Auto Trait Implementations
impl<H, T> RefUnwindSafe for TreeBag<H, T> where
H: RefUnwindSafe,
T: RefUnwindSafe,
[src]
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for TreeBag<H, T> where
H: Send,
T: Send,
[src]
H: Send,
T: Send,
impl<H, T> Sync for TreeBag<H, T> where
H: Sync,
T: Sync,
[src]
H: Sync,
T: Sync,
impl<H, T> Unpin for TreeBag<H, T>
[src]
impl<H, T> UnwindSafe for TreeBag<H, T> where
H: RefUnwindSafe,
T: RefUnwindSafe,
[src]
H: RefUnwindSafe,
T: RefUnwindSafe,
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,