Skip to main content

LinksTree

Trait LinksTree 

Source
pub trait LinksTree<T: LinkReference> {
    // Required methods
    fn count_usages(&self, root: T) -> T;
    fn search(&self, source: T, target: T) -> T;
    fn each_usages<H: FnMut(Link<T>) -> Flow + ?Sized>(
        &self,
        root: T,
        handler: &mut H,
    ) -> Flow;
    fn detach(&mut self, root: &mut T, index: T);
    fn attach(&mut self, root: &mut T, index: T);
}

Required Methods§

Source

fn count_usages(&self, root: T) -> T

Source

fn search(&self, source: T, target: T) -> T

Source

fn each_usages<H: FnMut(Link<T>) -> Flow + ?Sized>( &self, root: T, handler: &mut H, ) -> Flow

Source

fn detach(&mut self, root: &mut T, index: T)

Source

fn attach(&mut self, root: &mut T, index: T)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§