Struct idmap::set::IdSet [−][src]
pub struct IdSet<T: IntegerId> { /* fields omitted */ }
Expand description
A set, whose implement IntegerId
This is implemented directly as a bitset, so it may not be appropriate if you know you’ll have large ids but few entries.
Implementations
Initialize the set with the given capacity
Since the underlying storage is a simple bitset, this hints at the maximum capacity and not the length
Inserts the specified element into the set,
returning true
if it was already in the set and false
if it wasn’t.
Remove the specified value from the set if it is present, returning whether or not it was present.
Check if this set contains the specified value
Iterate over the values in this set
The number of entries in this set
An IdSet internally tracks this length, so this is a O(1)
operation
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Creates a value from an iterator. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for IdSet<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for IdSet<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.