pub struct TraverseMut<'a, T, S> { /* private fields */ }Expand description
Implements the traverse algorithms for a mutable reference of a Node.
Implementations§
Source§impl<'a, T> TraverseMut<'a, T, Asynchronous>
impl<'a, T> TraverseMut<'a, T, Asynchronous>
Sourcepub fn into_sync(self) -> TraverseMut<'a, T, Synchronous>
pub fn into_sync(self) -> TraverseMut<'a, T, Synchronous>
Converts the asynchronous traverse into a synchronous one.
Source§impl<'a, T: Sync + Send + 'a> TraverseMut<'a, T, Asynchronous>
impl<'a, T: Sync + Send + 'a> TraverseMut<'a, T, Asynchronous>
Sourcepub async fn for_each<F>(self, f: F)
pub async fn for_each<F>(self, f: F)
Calls the given closure for each node in the tree rooted by self.
Sourcepub async fn map<F, R>(self, f: F) -> TraverseOwned<R, Asynchronous>
pub async fn map<F, R>(self, f: F) -> TraverseOwned<R, Asynchronous>
Builds a new tree by calling the given closure along the tree rooted by self following the pre-order traversal.
Source§impl<'a, T> TraverseMut<'a, T, Synchronous>
impl<'a, T> TraverseMut<'a, T, Synchronous>
pub fn into_async(self) -> TraverseMut<'a, T, Asynchronous>
Source§impl<'a, T> TraverseMut<'a, T, Synchronous>
impl<'a, T> TraverseMut<'a, T, Synchronous>
Sourcepub fn for_each<F>(self, f: F) -> Self
pub fn for_each<F>(self, f: F) -> Self
Traverses the tree rooted by self in post-order, calling the given closure along the way.
Sourcepub fn map<F, R>(self, f: F) -> TraverseOwned<R, Synchronous>
pub fn map<F, R>(self, f: F) -> TraverseOwned<R, Synchronous>
Traverses the tree rooted by self in pre-order, building a new tree by calling the given closure along the way.
Source§impl<'a, T, S> TraverseMut<'a, T, S>
impl<'a, T, S> TraverseMut<'a, T, S>
Trait Implementations§
Source§impl<'a, T, S> From<&'a mut Node<T>> for TraverseMut<'a, T, S>
impl<'a, T, S> From<&'a mut Node<T>> for TraverseMut<'a, T, S>
Source§impl<'a, T> From<TraverseMut<'a, T, Asynchronous>> for TraverseMut<'a, T, Synchronous>
impl<'a, T> From<TraverseMut<'a, T, Asynchronous>> for TraverseMut<'a, T, Synchronous>
Source§fn from(value: TraverseMut<'a, T, Asynchronous>) -> Self
fn from(value: TraverseMut<'a, T, Asynchronous>) -> Self
Converts to this type from the input type.
Source§impl<'a, T> From<TraverseMut<'a, T, Synchronous>> for TraverseMut<'a, T, Asynchronous>
impl<'a, T> From<TraverseMut<'a, T, Synchronous>> for TraverseMut<'a, T, Asynchronous>
Source§fn from(value: TraverseMut<'a, T, Synchronous>) -> Self
fn from(value: TraverseMut<'a, T, Synchronous>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, T, S> Freeze for TraverseMut<'a, T, S>
impl<'a, T, S> RefUnwindSafe for TraverseMut<'a, T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, S> Send for TraverseMut<'a, T, S>
impl<'a, T, S> Sync for TraverseMut<'a, T, S>
impl<'a, T, S> Unpin for TraverseMut<'a, T, S>where
S: Unpin,
impl<'a, T, S> !UnwindSafe for TraverseMut<'a, T, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more