[−][src]Struct rustc_data_structures::indexed_set::IdxSet
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Represents a set of some element type E, where each E is identified by some
unique index type T
.
In other words, T
is the type used to index into the bitvector
this type uses to represent the set of object it holds.
The representation is dense, using one bit per possible element.
Methods
impl<T: Idx> IdxSet<T>
[src]
impl<T: Idx> IdxSet<T>
pub fn new_empty(domain_size: usize) -> Self
[src]
pub fn new_empty(domain_size: usize) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Creates set holding no elements.
pub fn new_filled(domain_size: usize) -> Self
[src]
pub fn new_filled(domain_size: usize) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Creates set holding every element whose index falls in range 0..domain_size.
pub fn to_hybrid(&self) -> HybridIdxSet<T>
[src]
pub fn to_hybrid(&self) -> HybridIdxSet<T>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Duplicates as a hybrid set.
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Removes all elements
pub fn set_up_to(&mut self, domain_size: usize)
[src]
pub fn set_up_to(&mut self, domain_size: usize)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Sets all elements up to domain_size
pub fn remove(&mut self, elem: &T) -> bool
[src]
pub fn remove(&mut self, elem: &T) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Removes elem
from the set self
; returns true iff this changed self
.
pub fn add(&mut self, elem: &T) -> bool
[src]
pub fn add(&mut self, elem: &T) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Adds elem
to the set self
; returns true iff this changed self
.
pub fn contains(&self, elem: &T) -> bool
[src]
pub fn contains(&self, elem: &T) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns true iff set self
contains elem
.
pub fn words(&self) -> &[Word]
[src]
pub fn words(&self) -> &[Word]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn words_mut(&mut self) -> &mut [Word]
[src]
pub fn words_mut(&mut self) -> &mut [Word]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn overwrite(&mut self, other: &IdxSet<T>)
[src]
pub fn overwrite(&mut self, other: &IdxSet<T>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Efficiently overwrite self
with other
. Panics if self
and other
don't have the same length.
pub fn union(
&mut self,
other: &impl UnionIntoIdxSet<T>
) -> bool
[src]
pub fn union(
&mut self,
other: &impl UnionIntoIdxSet<T>
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Set self = self | other
and return true if self
changed
(i.e., if new bits were added).
pub fn subtract(
&mut self,
other: &impl SubtractFromIdxSet<T>
) -> bool
[src]
pub fn subtract(
&mut self,
other: &impl SubtractFromIdxSet<T>
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Set self = self - other
and return true if self
changed.
(i.e., if any bits were removed).
pub fn intersect(&mut self, other: &IdxSet<T>) -> bool
[src]
pub fn intersect(&mut self, other: &IdxSet<T>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Set self = self & other
and return true if self
changed.
(i.e., if any bits were removed).
ⓘImportant traits for BitIter<'a, C>pub fn iter(&self) -> BitIter<T>
[src]
pub fn iter(&self) -> BitIter<T>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<T: Clone + Idx> Clone for IdxSet<T>
[src]
impl<T: Clone + Idx> Clone for IdxSet<T>
fn clone(&self) -> IdxSet<T>
[src]
fn clone(&self) -> IdxSet<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Eq + Idx> Eq for IdxSet<T>
[src]
impl<T: Eq + Idx> Eq for IdxSet<T>
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl<T: PartialEq + Idx> PartialEq for IdxSet<T>
[src]
impl<T: PartialEq + Idx> PartialEq for IdxSet<T>
fn eq(&self, other: &IdxSet<T>) -> bool
[src]
fn eq(&self, other: &IdxSet<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &IdxSet<T>) -> bool
[src]
fn ne(&self, other: &IdxSet<T>) -> bool
This method tests for !=
.
impl<T: Idx> Encodable for IdxSet<T>
[src]
impl<T: Idx> Encodable for IdxSet<T>
fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error>
[src]
fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<T: Idx> Decodable for IdxSet<T>
[src]
impl<T: Idx> Decodable for IdxSet<T>
fn decode<D: Decoder>(d: &mut D) -> Result<IdxSet<T>, D::Error>
[src]
fn decode<D: Decoder>(d: &mut D) -> Result<IdxSet<T>, D::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<T: Idx> Debug for IdxSet<T>
[src]
impl<T: Idx> Debug for IdxSet<T>
fn fmt(&self, w: &mut Formatter) -> Result
[src]
fn fmt(&self, w: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Idx> UnionIntoIdxSet<T> for IdxSet<T>
[src]
impl<T: Idx> UnionIntoIdxSet<T> for IdxSet<T>
fn union_into(&self, other: &mut IdxSet<T>) -> bool
[src]
fn union_into(&self, other: &mut IdxSet<T>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<T: Idx> SubtractFromIdxSet<T> for IdxSet<T>
[src]
impl<T: Idx> SubtractFromIdxSet<T> for IdxSet<T>
fn subtract_from(&self, other: &mut IdxSet<T>) -> bool
[src]
fn subtract_from(&self, other: &mut IdxSet<T>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<I: Idx, CTX> HashStable<CTX> for IdxSet<I>
[src]
impl<I: Idx, CTX> HashStable<CTX> for IdxSet<I>
fn hash_stable<W: StableHasherResult>(
&self,
ctx: &mut CTX,
hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
ctx: &mut CTX,
hasher: &mut StableHasher<W>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
Blanket Implementations
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder,
[src]
fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
impl<T> Decodable for T where
T: UseSpecializedDecodable,
fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder,
[src]
fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
impl<T> Erased for T