[][src]Struct transact::scheduler::parallel::tree::RadixTree

pub struct RadixTree<T> { /* fields omitted */ }

Methods

impl<T: Clone> RadixTree<T>[src]

This radix tree is a prefix tree: a node's address is always a strict prefix of the addresses of its children, and every node either has data or has multiple children.

pub fn new() -> Self[src]

pub fn walk(&self, address: &str) -> Vec<(String, Option<T>)>[src]

Return a vector of tuple pairs of node addresses and data The Node address is the key, the data is the value. First the ancestors of ADDRESS (including self) are yielded, earliest to latest, and then the descendants of ADDRESS are yielded

pub fn update(
    &self,
    address: &str,
    updater: &dyn Fn(Option<T>) -> Option<T>,
    prune: bool
)
[src]

Walk to ADDRESS, creating nodes if necessary, and set the data there to UPDATER(data)

pub fn prune(&self, address: &str)[src]

Remove all children (and descendants) below ADDRESS

Trait Implementations

impl<T: Default> Default for RadixTree<T>[src]

impl<T: Clone> Clone for RadixTree<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for RadixTree<T>[src]

Auto Trait Implementations

impl<T> !Send for RadixTree<T>

impl<T> !Sync for RadixTree<T>

Blanket Implementations

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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> Same<T> for T

type Output = T

Should always be Self