Struct collections::linked_list::Rawlink
[−]
[src]
struct Rawlink<T> { p: Option<Shared<T>>, }
Fields
p |
Methods
impl<T> Rawlink<T>
Rawlink is a type like Option
fn none() -> Rawlink<T>
Like Option::None for Rawlink
fn some(n: &mut T) -> Rawlink<T>
Like Option::Some for Rawlink
unsafe fn resolve<'a>(&self) -> Option<&'a T>
Convert the Rawlink
into an Option value
unsafe because:
- Dereference of raw pointer.
- Returns reference of arbitrary lifetime.
unsafe fn resolve_mut<'a>(&mut self) -> Option<&'a mut T>
Convert the Rawlink
into an Option value
unsafe because:
- Dereference of raw pointer.
- Returns reference of arbitrary lifetime.
fn take(&mut self) -> Rawlink<T>
Return the Rawlink
and replace with Rawlink::none()