pub struct KeywordSet(FastHashSet<&'static str>);
Expand description
A case-sensitive set of strings,
for use with Namer
to avoid collisions with keywords and other reserved
identifiers.
This is currently implemented as a hash table. Future versions of Naga may change the implementation based on speed and code size considerations.
Tuple Fields§
§0: FastHashSet<&'static str>
Implementations§
Trait Implementations§
Source§impl Clone for KeywordSet
impl Clone for KeywordSet
Source§fn clone(&self) -> KeywordSet
fn clone(&self) -> KeywordSet
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeywordSet
impl Debug for KeywordSet
Source§impl Default for &'static KeywordSet
impl Default for &'static KeywordSet
Source§impl Default for KeywordSet
impl Default for KeywordSet
Source§fn default() -> KeywordSet
fn default() -> KeywordSet
Returns the “default value” for a type. Read more
Source§impl<'a> Extend<&'a &'static str> for KeywordSet
Accepts double references so that .extend(&["foo"])
works.
impl<'a> Extend<&'a &'static str> for KeywordSet
Accepts double references so that .extend(&["foo"])
works.
Source§fn extend<T: IntoIterator<Item = &'a &'static str>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = &'a &'static str>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<&'static str> for KeywordSet
impl Extend<&'static str> for KeywordSet
Source§fn extend<T: IntoIterator<Item = &'static str>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = &'static str>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a> FromIterator<&'a &'static str> for KeywordSet
Accepts double references so that KeywordSet::from_iter(&["foo"])
works.
impl<'a> FromIterator<&'a &'static str> for KeywordSet
Accepts double references so that KeywordSet::from_iter(&["foo"])
works.
Source§impl FromIterator<&'static str> for KeywordSet
impl FromIterator<&'static str> for KeywordSet
Source§impl PartialEq for KeywordSet
impl PartialEq for KeywordSet
impl Eq for KeywordSet
impl StructuralPartialEq for KeywordSet
Auto Trait Implementations§
impl Freeze for KeywordSet
impl RefUnwindSafe for KeywordSet
impl Send for KeywordSet
impl Sync for KeywordSet
impl Unpin for KeywordSet
impl UnwindSafe for KeywordSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.