[][src]Struct dynamic_graph::CursorMut

pub struct CursorMut<'this, 'id: 'this, T: 'this> { /* fields omitted */ }

A wrapper over a GraphPtr which provides simplified access to AnchorMut API.

Methods

impl<'this, 'id: 'this, N: 'this, E: 'this, NodeType: 'this> CursorMut<'this, 'id, NodeType> where
    NodeType: GraphNode<Node = N, Edge = E>, 
[src]

pub fn at(&self) -> GraphPtr<'id, NodeType>[src]

Returns a pointer to the current node the cursor points to.

pub fn is_at(&self, dst: GraphPtr<'id, NodeType>) -> bool[src]

Returns true if the cursor points to dst.

pub fn jump(&mut self, dst: GraphPtr<'id, NodeType>)[src]

Moves the cursor to dst.

impl<'this, 'id: 'this, N: 'this, E: 'this> CursorMut<'this, 'id, NamedNode<N, E>>[src]

pub fn edges(
    &self
) -> impl Iterator<Item = GraphIterRes<Edge<&N, &E>, GraphPtr<'id, NamedNode<N, E>>>>
[src]

Returns an iterator over edges and node pointers attached to the current node.

pub fn get_edge(
    &self,
    dst: GraphPtr<'id, NamedNode<N, E>>
) -> Option<Edge<&N, &E>>
[src]

Returns Some if dst is attached to the current node and None otherwise.

impl<'this, 'id: 'this, N: 'this, E: 'this> CursorMut<'this, 'id, NamedNode<N, E>>[src]

pub fn edges_mut(
    &mut self
) -> impl Iterator<Item = GraphIterRes<Edge<&mut N, &mut E>, GraphPtr<'id, NamedNode<N, E>>>>
[src]

Returns a mutable iterator over edges and node pointers attached to the current node.

pub fn bridge(
    &mut self,
    dst: GraphPtr<'id, NamedNode<N, E>>
) -> Option<(&mut NamedNode<'id, N, E>, &mut NamedNode<'id, N, E>)>
[src]

Provides direct mutable access to current and dst nodes or or None if current is the same as dst. Returns mutable views into the current and dst nodes or None if current is the same as dst.

Trait Implementations

impl<'this, 'id: 'this, N: 'this, E: 'this> Deref for CursorMut<'this, 'id, NamedNode<N, E>>[src]

type Target = NamedNode<'id, N, E>

The resulting type after dereferencing.

impl<'this, 'id: 'this, N: 'this, E: 'this> DerefMut for CursorMut<'this, 'id, NamedNode<N, E>>[src]

Auto Trait Implementations

impl<'this, 'id, T> RefUnwindSafe for CursorMut<'this, 'id, T> where
    T: RefUnwindSafe

impl<'this, 'id, T> !Send for CursorMut<'this, 'id, T>

impl<'this, 'id, T> !Sync for CursorMut<'this, 'id, T>

impl<'this, 'id, T> Unpin for CursorMut<'this, 'id, T>

impl<'this, 'id, T> !UnwindSafe for CursorMut<'this, 'id, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.