Struct timely::container::flatcontainer::impls::offsets::OffsetList
source · pub struct OffsetList {
pub smol: Vec<u32>,
pub chonk: Vec<u64>,
}
Expand description
A list of unsigned integers that uses u32
elements as long as they are small enough, and switches to u64
once they are not.
Fields§
§smol: Vec<u32>
Offsets that fit within a u32
.
chonk: Vec<u64>
Offsets that either do not fit in a u32
, or are inserted after some offset that did not fit.
Implementations§
source§impl OffsetList
impl OffsetList
sourcepub fn with_capacity(cap: usize) -> OffsetList
pub fn with_capacity(cap: usize) -> OffsetList
Allocate a new list with a specified capacity.
sourcepub fn push(&mut self, offset: usize)
pub fn push(&mut self, offset: usize)
Inserts the offset, as a u32
if that is still on the table.
§Panics
Panics if usize
does not fit in u64
.
Trait Implementations§
source§impl Clone for OffsetList
impl Clone for OffsetList
source§fn clone(&self) -> OffsetList
fn clone(&self) -> OffsetList
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 OffsetList
impl Debug for OffsetList
source§impl Default for OffsetList
impl Default for OffsetList
source§fn default() -> OffsetList
fn default() -> OffsetList
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for OffsetList
impl<'de> Deserialize<'de> for OffsetList
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OffsetList, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OffsetList, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for OffsetList
impl PartialEq for OffsetList
source§impl Serialize for OffsetList
impl Serialize for OffsetList
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for OffsetList
impl StructuralPartialEq for OffsetList
Auto Trait Implementations§
impl Freeze for OffsetList
impl RefUnwindSafe for OffsetList
impl Send for OffsetList
impl Sync for OffsetList
impl Unpin for OffsetList
impl UnwindSafe for OffsetList
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.