Trait Node

Source
pub trait Node
where Self: Sized + Hash + Eq + Debug,
{ type Error: Debug; // Required method fn children<'async_trait>( self: Arc<Self>, depth: usize, ) -> Pin<Box<dyn Future<Output = Result<NodeStream<Self, Self::Error>, Self::Error>> + Send + 'async_trait>> where Self: 'async_trait; }
Available on crate feature async only.
Expand description

A node which produces a Stream of children Nodes for a given depth.

Required Associated Types§

Source

type Error: Debug

The type of the error when creating the stream fails.

Required Methods§

Source

fn children<'async_trait>( self: Arc<Self>, depth: usize, ) -> Pin<Box<dyn Future<Output = Result<NodeStream<Self, Self::Error>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Returns a NodeStream of its children.

§Errors

Should return Self::Error if the stream can not be created.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§