Skip to main content

NonEmptyPath

Trait NonEmptyPath 

pub trait NonEmptyPath<N>: Path<N>
where N: Into<NodeId> + Copy,
{ // Provided method fn last_hop(&self) -> &N { ... } }
Expand description

A Path that is guaranteed to have at least one hop - the destination.

Provided Methods§

fn last_hop(&self) -> &N

Gets the last hop (destination)

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§