MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / keys

Method keys

cranelift/entity/src/set.rs:127–129  ·  view source on GitHub ↗

Iterate over all the keys up to the maximum in this set. This will yield intermediate keys on the way up to the max key, even if they are not contained within the set. ``` use cranelift_entity::{entity_impl, EntityRef, EntitySet}; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] struct Entity(u32); entity_impl!(Entity); let mut set = EntitySet::new(); set.insert(Entity::new(2)); let mut key

(&self)

Source from the content-addressed store, hash-verified

125 /// assert!(keys.next().is_none());
126 /// ```
127 pub fn keys(&self) -> Keys<K> {
128 Keys::with_len(self.bitset.max().map_or(0, |x| x + 1))
129 }
130
131 /// Iterate over the elements of this set.
132 ///

Callers 1

basicFunction · 0.45

Calls 1

maxMethod · 0.45

Tested by 1

basicFunction · 0.36