GenericGraph

Struct GenericGraph 

Source
pub struct GenericGraph<Root, NodeType>
where Root: RootCollection<'static, NodeType>, NodeType: GraphNode,
{ /* private fields */ }

Implementations§

Source§

impl<Root, NodeType> GenericGraph<Root, NodeType>
where Root: RootCollection<'static, NodeType>, NodeType: GraphNode,

Source

pub fn new() -> Self

Source§

impl<Root, NodeType> GenericGraph<Root, NodeType>
where Root: RootCollection<'static, NodeType>, NodeType: GraphNode,

Source

pub unsafe fn anchor_mut<'id>( &mut self, guard: Id<'id>, strategy: CleanupStrategy, ) -> AnchorMut<'_, 'id, GenericGraph<Root, NodeType>>

Creates an AnchorMut from a generativity brand using selected cleanup strategy. Prefer anchor_mut! macro in application code.

§Safety

Caller must use a unique guard from generativity::Guard.

Source

pub unsafe fn anchor<'id>( &self, guard: Id<'id>, ) -> Anchor<'_, 'id, GenericGraph<Root, NodeType>>

Creates an Anchor from a generativity brand. Prefer anchor! macro in application code.

§Safety

Caller must use a unique guard from generativity::Guard.

Trait Implementations§

Source§

impl<Root, NodeType> Default for GenericGraph<Root, NodeType>
where Root: RootCollection<'static, NodeType>, NodeType: GraphNode,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<Root, NodeType> GraphImpl for GenericGraph<Root, NodeType>
where Root: RootCollection<'static, NodeType>, NodeType: GraphNode,

Source§

fn cleanup_precise(&mut self)

Traverses the graph and drops any inaccessible node. Disregards any heuristic designed to improve cleanup performance.
Source§

fn cleanup(&mut self)

Traverses the graph and drops inaccessible nodes. This method will miss some of the leaked items which might result in spikes in memory usage. !! Currently, none of the possible heuristics are implemented.

Auto Trait Implementations§

§

impl<Root, NodeType> Freeze for GenericGraph<Root, NodeType>
where Root: Freeze,

§

impl<Root, NodeType> RefUnwindSafe for GenericGraph<Root, NodeType>
where Root: RefUnwindSafe, NodeType: RefUnwindSafe,

§

impl<Root, NodeType> Send for GenericGraph<Root, NodeType>
where Root: Send, NodeType: Send,

§

impl<Root, NodeType> Sync for GenericGraph<Root, NodeType>
where Root: Sync, NodeType: Sync,

§

impl<Root, NodeType> Unpin for GenericGraph<Root, NodeType>
where Root: Unpin, NodeType: Unpin,

§

impl<Root, NodeType> UnwindSafe for GenericGraph<Root, NodeType>
where Root: UnwindSafe, NodeType: RefUnwindSafe + UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.