[−][src]Struct rc_dlist_deque::dlist::Pointer
Reference to a node, with respect to its potential membership of a list.
If the node can be a member of multiple lists, a reference to a specific one of its potential memberships. (Another way to look at this is that a pointer is a reference to a particular link within a node.)
May be kept persistently in other data structures.
May point to an element which is not currently on a list, but may not point to no element.
Holds an Rc
onto the node.
Methods
impl<N, S: Selector<Node = N>> Pointer<N, S>
[src]
pub fn new(p: &Rc<N>) -> Pointer<N, S> where
S: Default,
[src]
S: Default,
Makes a pointer out of a reference to a node.
Only possible where the selector type has a default value;
eg, when called as Pointer1::new
, or in other situations
where the relevant link in each node is identified at compile-time.
pub fn with_selector(p: &Rc<N>, selector: S) -> Pointer<N, S>
[src]
Makes a pointer, with runtime link selection
Given a reference p
to a node, and selector
,
makes them into a pointer --- that is, a reference
to the node but with respect to that specific possible
list membership.
pub fn from_data(data: N, selector: S) -> Pointer<N, S>
[src]
Consumes data
, and returns a reference ready for use with a
list.
pub fn selector(&self) -> S
[src]
Returns the selector portion of the pointer.
pub fn ptr_eq(a: &Pointer<N, S>, b: &Pointer<N, S>) -> bool where
S: PartialEq,
[src]
S: PartialEq,
true
iff the pointers are equal.
Ie, if they both point to the same node and (with runtime link selection) have the same selector. Ie, they both refer to the same link within the same node.
pub fn cursor_eq(a: &Cursor<N, S>, b: &Cursor<N, S>) -> bool where
S: PartialEq,
[src]
S: PartialEq,
true
iff both pointers are equal, or both are null (None
).
ⓘImportant traits for ListIterator<N, S>pub fn iter_at(&self) -> ListIterator<N, S>
[src]
Returns an iterator starting here
The iterator will process the entry referred to by
self
, and subsequent entries.
pub fn get_next_prev(&self, rev: bool) -> Cursor<N, S>
[src]
Returns a cursor pointing to the next or previous item.
Methods from Deref<Target = Rc<N>>
Trait Implementations
impl<N, S: Selector<Node = N>> Clone for Pointer<N, S>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<N, S: Selector<Node = N> + Debug> Debug for Pointer<N, S>
[src]
impl<N, S: Selector<Node = N>> Deref for Pointer<N, S>
[src]
impl<N, S: Selector<Node = N>> DerefMut for Pointer<N, S>
[src]
impl<'a, N, S> From<&'a Rc<N>> for Pointer<N, S> where
S: Default + Selector<Node = N>,
[src]
S: Default + Selector<Node = N>,
impl<N, S: Default + Selector<Node = N>> From<N> for Pointer<N, S>
[src]
impl<N, S> From<Rc<N>> for Pointer<N, S> where
S: Default + Selector<Node = N>,
[src]
S: Default + Selector<Node = N>,
impl<N, S: Selector<Node = N> + SelectorFmt> Pointer for Pointer<N, S>
[src]
Auto Trait Implementations
impl<N, S> !RefUnwindSafe for Pointer<N, S>
impl<N, S> !Send for Pointer<N, S>
impl<N, S> !Sync for Pointer<N, S>
impl<N, S> Unpin for Pointer<N, S> where
S: Unpin,
S: Unpin,
impl<N, S> UnwindSafe for Pointer<N, S> where
N: RefUnwindSafe,
S: UnwindSafe,
N: RefUnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,