Struct layout_2013::flow_list::FlowList
source · pub struct FlowList {
flows: LinkedList<FlowRef>,
}
Expand description
This needs to be reworked now that we have dynamically-sized types in Rust. Until then, it’s just a wrapper around LinkedList.
SECURITY-NOTE(pcwalton): It is very important that FlowRef
values not leak directly to
layout. Layout code must only interact with &Flow
or &mut Flow
values. Otherwise, layout
could stash FlowRef
values in random places unknown to the system and thereby cause data
races. Those data races can lead to memory safety problems, potentially including arbitrary
remote code execution! In general, do not add new methods to this file (e.g. new ways of
iterating over flows) unless you are very sure of what you are doing.
Fields§
§flows: LinkedList<FlowRef>
Implementations§
source§impl FlowList
impl FlowList
pub fn push_back_arc(&mut self, new_head: Arc<dyn Flow>)
pub fn push_front_arc(&mut self, new_head: Arc<dyn Flow>)
pub fn pop_front_arc(&mut self) -> Option<Arc<dyn Flow>>
sourcepub fn iter(&self) -> FlowListIterator<'_> ⓘ
pub fn iter(&self) -> FlowListIterator<'_> ⓘ
Provide a forward iterator.
SECURITY-NOTE(pcwalton): This does not hand out FlowRef
s by design. Do not add a method
to do so! See the comment above in FlowList
.
sourcepub fn iter_mut(&mut self) -> MutFlowListIterator<'_> ⓘ
pub fn iter_mut(&mut self) -> MutFlowListIterator<'_> ⓘ
Provide a forward iterator with mutable references
SECURITY-NOTE(pcwalton): This does not hand out FlowRef
s by design. Do not add a method
to do so! See the comment above in FlowList
.
sourcepub fn random_access_mut(&mut self) -> FlowListRandomAccessMut<'_>
pub fn random_access_mut(&mut self) -> FlowListRandomAccessMut<'_>
Provides a caching random-access iterator that yields mutable references. This is guaranteed to perform no more than O(n) pointer chases.
SECURITY-NOTE(pcwalton): This does not hand out FlowRef
s by design. Do not add a method
to do so! See the comment above in FlowList
.
pub fn split_off(&mut self, i: usize) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowList
impl !RefUnwindSafe for FlowList
impl Send for FlowList
impl Sync for FlowList
impl Unpin for FlowList
impl !UnwindSafe for FlowList
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.