pub trait NextLayer {
type Denom: Copy + Eq;
type Hint: Copy + Eq;
// Provided methods
fn next_layer(&self) -> Option<Self::Denom> { ... }
fn next_layer_choice(
&self,
_hint: Option<Self::Hint>,
) -> Option<Self::Denom> { ... }
}Expand description
Headers which can be queried for a hint, used to select the next layer in a packet.
Required Associated Types§
Provided Methods§
Sourcefn next_layer(&self) -> Option<Self::Denom>
fn next_layer(&self) -> Option<Self::Denom>
Retrieve this header’s next-layer hint, if possible.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<B: ByteSlice, T: for<'a> HasView<&'a [u8]> + HasView<B> + NextLayer<Hint = <T as NextLayer>::Denom>> NextLayer for RepeatedView<B, T>
impl<B: ByteSlice, T: for<'a> HasView<&'a [u8]> + HasView<B> + NextLayer<Hint = <T as NextLayer>::Denom>> NextLayer for RepeatedView<B, T>
Source§impl<O: NextLayer, B> NextLayer for BoxedHeader<O, B>
Available on crate feature alloc only.
impl<O: NextLayer, B> NextLayer for BoxedHeader<O, B>
Available on crate feature
alloc only.