[−][src]Struct dynamic_graph::GraphPtr
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
NodeType: GraphNode<Node = N, Edge = E>,
type Output = N
The returned type after indexing.
fn index(&self, dst: GraphPtr<'id, NodeType>) -> &Self::Output
[src]
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]
NodeType: GraphNode<Node = N, Edge = E>,
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,
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]
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> 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>,