pub struct ListRef<T>(/* private fields */);
Expand description
A handle to a list stored in a ListPool
.
The handle can be used to yield the actual slice, given the pool,
but has much smaller overhead than a separately-owned Vec
: e.g.,
8 bytes on 64-bit systems, rather than 24 bytes, and no separate
memory allocation overhead.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for ListRef<T>
impl<'de, T> Deserialize<'de> for ListRef<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasValues<FunctionBody> for ListRef<Value>
impl HasValues<FunctionBody> for ListRef<Value>
fn values<'a>( &'a self, f: &'a FunctionBody, ) -> Box<dyn Iterator<Item = <FunctionBody as Func>::Value> + 'a>
fn values_mut<'a>(
&'a mut self,
g: &'a mut FunctionBody,
) -> Box<dyn Iterator<Item = &'a mut <FunctionBody as Func>::Value> + 'a>where
FunctionBody: 'a,
impl<T: Copy> Copy for ListRef<T>
impl<T: Eq> Eq for ListRef<T>
impl<T> StructuralPartialEq for ListRef<T>
Auto Trait Implementations§
impl<T> Freeze for ListRef<T>
impl<T> RefUnwindSafe for ListRef<T>where
T: RefUnwindSafe,
impl<T> Send for ListRef<T>where
T: Send,
impl<T> Sync for ListRef<T>where
T: Sync,
impl<T> Unpin for ListRef<T>where
T: Unpin,
impl<T> UnwindSafe for ListRef<T>where
T: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more