Trait sixarm_collections::btree_map_of_file_len_to_set_of_path_buf::BTreeMapOfFileLenToSetOfPathBufExt[][src]

pub trait BTreeMapOfFileLenToSetOfPathBufExt {
    fn sub_contains_path(&self, value: &PathBuf) -> bool;
fn sub_insert_path(&mut self, value: PathBuf) -> bool;
fn sub_remove_path(&mut self, value: PathBuf) -> bool; }

Required methods

fn sub_contains_path(&self, value: &PathBuf) -> bool[src]

fn sub_insert_path(&mut self, value: PathBuf) -> bool[src]

fn sub_remove_path(&mut self, value: PathBuf) -> bool[src]

Loading content...

Implementors

impl BTreeMapOfFileLenToSetOfPathBufExt for BTreeMapOfFileLenToSetOfPathBuf[src]

fn sub_contains_path(&self, value: &PathBuf) -> bool[src]

Return true if the collection contains a sub-key-value item.

The value may be any borrowed form of the set’s value type, but Hash and Eq on the borrowed form must match those for the value type.

Examples

use sixarm_collections::*;
use std::collections::{BTreeMap, BTreeSet};
use std::path::PathBuf;

let mut a: BTreeMapOfFileLenToSetOfPathBuf = BTreeMapOfFileLenToSetOfPathBuf::new();
let alpha = PathBuf::from("alpha.txt");
let bravo = PathBuf::from("bravo.txt");
a.sub_insert_path(alpha.clone());
assert_eq!(a.sub_contains_path(&alpha), true);
assert_eq!(a.sub_contains_path(&bravo), false);

fn sub_insert_path(&mut self, value: PathBuf) -> bool[src]

Add a sub-key-value item to the collection.

Return whether the item is added in the set.

Examples

use sixarm_collections::*;
use std::collections::{BTreeMap, BTreeSet};
use std::path::PathBuf;

let mut a: BTreeMapOfFileLenToSetOfPathBuf = BTreeMapOfFileLenToSetOfPathBuf::new();
let alpha = PathBuf::from("alpha.txt");
a.sub_insert_path(alpha.clone());
assert_eq!(a.sub_contains_path(&alpha), true);

fn sub_remove_path(&mut self, value: PathBuf) -> bool[src]

Remove a sub-key-value pair from the collection.

Return whether the value was present in the set.

The value may be any borrowed form of the set’s value type, but Hash and Eq on the borrowed form must match those for the value type.

Examples

use sixarm_collections::*;
use std::collections::{BTreeMap, BTreeSet};
use std::path::PathBuf;

let mut a: BTreeMapOfFileLenToSetOfPathBuf = BTreeMapOfFileLenToSetOfPathBuf::new();
let alpha = PathBuf::from("alpha.txt");
a.sub_insert_path(alpha.clone());
assert_eq!(a.sub_contains_path(&alpha), true);
a.sub_remove_path(alpha.clone());
assert_eq!(a.sub_contains_path(&alpha), false);
Loading content...