Struct rusty_source_map::array_set::ArraySet [−][src]
pub struct ArraySet { /* fields omitted */ }
Implementations
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::new();
assert_eq!(set.size(), 0);
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.size(), 1);
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.size(), 1);
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let mut set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
set.add("string".to_owned(), false);
assert_eq!(set.size(), 2);
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.has("a".to_owned()), true);
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.index_of("a".to_owned()), Some(0));
What is the element at the given index?
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.at(0), Some("a".to_owned()));
Returns the array representation of this set (which has the proper indices indicated by indexOf). Note that this is a copy of the internal array used for storing the members so that no one can mess with internal state.
Examples
use rusty_source_map::array_set;
let set = array_set::ArraySet::from_array(vec!["a".to_owned()], false);
assert_eq!(set.to_vec().len(), 1);