[−][src]Struct transact::scheduler::parallel::tree::RadixTree
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]
&self,
address: &str,
updater: &dyn Fn(Option<T>) -> Option<T>,
prune: bool
)
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(&self) -> 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
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> Same<T> for T
type Output = T
Should always be Self