pub struct Node<A, B: NextNode> {
pub data: A,
pub next: B,
}
Expand description
Represents a collection of one or more objects.
Fields§
§data: A
The object held in this node
next: B
Next is any type implementing the NextNode trait. Typically this will be a node whose next field also implements NextNode (representing a collection of one or more nested node) or the unit type (representing an empty composite).
Implementations§
Trait Implementations§
impl<A, B: NextNode> NextNode for Node<A, B>
impl<A, B: NextNode> StructuralPartialEq for Node<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Node<A, B>
impl<A, B> RefUnwindSafe for Node<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Node<A, B>
impl<A, B> Sync for Node<A, B>
impl<A, B> Unpin for Node<A, B>
impl<A, B> UnwindSafe for Node<A, B>where
A: UnwindSafe,
B: UnwindSafe,
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