pub struct RcList<T> { /* private fields */ }
Expand description
RcList Head
Implementations§
Source§impl<T: Clone> RcList<T>
impl<T: Clone> RcList<T>
Sourcepub fn new_append(value: T, rest: &RcList<T>) -> RcList<T>
pub fn new_append(value: T, rest: &RcList<T>) -> RcList<T>
Create new RcList
from value and existing RcList
Sourcepub fn new_append_weak(value: T, rest: &RcList<T>) -> RcList<T>
pub fn new_append_weak(value: T, rest: &RcList<T>) -> RcList<T>
Create new RcList
from value and weakly referenced existing RcList
Weak-reference is useful for limiting memory consumption. After no other RcList
is
holding a part of the RcList
with non-weak reference, it will be freed.
Sourcepub fn iter(&self) -> RcListIter<T> ⓘ
pub fn iter(&self) -> RcListIter<T> ⓘ
Get iterator over RcList
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RcList<T>
impl<T> !RefUnwindSafe for RcList<T>
impl<T> !Send for RcList<T>
impl<T> !Sync for RcList<T>
impl<T> Unpin for RcList<T>
impl<T> !UnwindSafe for RcList<T>
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