[−][src]Struct dynamic_graph::CursorMut
Methods
impl<'this, 'id: 'this, N: 'this, E: 'this, NodeType: 'this> CursorMut<'this, 'id, NodeType> where
NodeType: GraphNode<Node = N, Edge = E>,
[src]
NodeType: GraphNode<Node = N, Edge = E>,
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 get(&self) -> &N
[src]
Returns a reference to payload of the current node.
pub fn jump(&mut self, dst: GraphPtr<'id, NodeType>)
[src]
Makes the cursor point to the dst
.
impl<'this, 'id: 'this, N: 'this, E: 'this> CursorMut<'this, 'id, NamedNode<N, E>>
[src]
pub fn iter(
&self
) -> impl Iterator<Item = GraphIterRes<Edge<&N, &E>, GraphPtr<'id, NamedNode<N, E>>>>
[src]
&self
) -> impl Iterator<Item = GraphIterRes<Edge<&N, &E>, GraphPtr<'id, NamedNode<N, E>>>>
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]
&self,
dst: GraphPtr<'id, NamedNode<N, E>>
) -> Option<Edge<&N, &E>>
Returns Some if dst
is attached to the current node and None otherwise.
impl<'this, 'id: 'this, N: 'this, E: 'this, NodeType: 'this> CursorMut<'this, 'id, NodeType> where
NodeType: GraphNode<Node = N, Edge = E>,
[src]
NodeType: GraphNode<Node = N, Edge = E>,
pub fn bridge(&mut self, dst: GraphPtr<'id, NodeType>) -> Edge<&mut N, ()>
[src]
Returns mutable references to payloads of the current node and dst
as if two are connected via an
empty edge.
pub fn get_mut(&mut self) -> &mut N
[src]
Returns a mutable reference to payload of the current node.
impl<'this, 'id: 'this, N: 'this, E: 'this> CursorMut<'this, 'id, NamedNode<N, E>>
[src]
pub fn iter_mut(
&mut self
) -> impl Iterator<Item = GraphIterRes<Edge<&mut N, &mut E>, GraphPtr<'id, NamedNode<N, E>>>>
[src]
&mut self
) -> impl Iterator<Item = GraphIterRes<Edge<&mut N, &mut E>, GraphPtr<'id, NamedNode<N, E>>>>
Returns a mutable iterator over edges and node pointers attached to the current node.
pub fn attach(&mut self, dst: GraphPtr<'id, NamedNode<N, E>>, edge: E)
[src]
Creates an edge from the current node to dst
with the value edge.
pub fn detach(&mut self, dst: GraphPtr<'id, NamedNode<N, E>>)
[src]
Removes an edge from the node to dst
.
Trait Implementations
impl<'this, 'id: 'this, N: 'this, E: 'this> Deref for CursorMut<'this, 'id, NamedNode<N, E>>
[src]
Relies on undefined behavior and should not be used
type Target = NamedNode<'id, N, E>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'this, 'id: 'this, N: 'this, E: 'this> DerefMut for CursorMut<'this, 'id, NamedNode<N, E>>
[src]
Relies on undefined behavior and should not be used
Auto Trait Implementations
impl<'this, 'id, T> RefUnwindSafe for CursorMut<'this, 'id, T> where
T: RefUnwindSafe,
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]
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<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,