[][src]Struct dynamic_graph::GraphPtr

#[repr(transparent)]
pub struct GraphPtr<'id, T> { /* fields omitted */ }

A checked pointer type used to access and traverse graph nodes in the crate. This pointer cannot be dereferenced directly and requires an anchor object to access the data stored in the collection. Thanks to 'generativity' crate this pointer can only be used with and created from an anchor branded with the same 'id and cannot be used once parent anchor is dropped.

Methods

impl<'id, T> GraphPtr<'id, T>[src]

pub fn as_ptr(self) -> *const T[src]

Returns a raw pointer to the graph node. This pointer should not be dereferenced directly and is meant to be a way to cache GraphPtrs between cleanups. You must ensure the node behind this pointer will not be deleted when the parent anchor is dropped

Trait Implementations

impl<'id, T> Clone for GraphPtr<'id, T>[src]

impl<'id, T> Copy for GraphPtr<'id, T>[src]

impl<'id, T: Eq> Eq for GraphPtr<'id, T>[src]

impl<'id, T> Hash for GraphPtr<'id, T>[src]

impl<'this, 'id: 'this, N: 'this, E: 'this, NodeType: 'this, Root: 'this> Index<GraphPtr<'id, NodeType>> for AnchorMut<'this, 'id, GenericGraph<Root, NodeType>> where
    NodeType: GraphNode<Node = N, Edge = E>, 
[src]

type Output = N

The returned type after indexing.

impl<'this, 'id: 'this, N: 'this, E: 'this, NodeType: 'this, Root: 'this> IndexMut<GraphPtr<'id, NodeType>> for AnchorMut<'this, 'id, GenericGraph<Root, NodeType>> where
    NodeType: GraphNode<Node = N, Edge = E>, 
[src]

impl<'id, T> PartialEq<GraphPtr<'id, T>> for GraphPtr<'id, T>[src]

impl<'id, T> StructuralEq for GraphPtr<'id, T>[src]

Auto Trait Implementations

impl<'id, T> RefUnwindSafe for GraphPtr<'id, T> where
    T: RefUnwindSafe

impl<'id, T> !Send for GraphPtr<'id, T>

impl<'id, T> !Sync for GraphPtr<'id, T>

impl<'id, T> Unpin for GraphPtr<'id, T>

impl<'id, T> !UnwindSafe for GraphPtr<'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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.