pub struct RoutingData<'a> { /* private fields */ }Expand description
Routing Extension header data.
As per RFC 8200, section 4.4 the Routing header is structured as: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . type-specific data . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where the format of the type-specific data is determined by the Routing Type.
Implementations§
Source§impl<'a> RoutingData<'a>
impl<'a> RoutingData<'a>
Sourcepub fn routing_type(&self) -> Result<RoutingType, RoutingTypeParseError>
pub fn routing_type(&self) -> Result<RoutingType, RoutingTypeParseError>
Returns the routing type.
Sourcepub fn segments_left(&self) -> u8
pub fn segments_left(&self) -> u8
Returns the number of segments left.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RoutingData<'a>
impl<'a> RefUnwindSafe for RoutingData<'a>
impl<'a> Send for RoutingData<'a>
impl<'a> Sync for RoutingData<'a>
impl<'a> Unpin for RoutingData<'a>
impl<'a> UnsafeUnpin for RoutingData<'a>
impl<'a> UnwindSafe for RoutingData<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more