pub struct Path(pub Address);Expand description
The Path header (RFC 3327 §4).
A route header, not a Contact-shaped one, and it has to be parsed with list semantics
for the same reason Record-Route does: proxies each add their own value, and RFC 3261
§7.3 lets a comma-joined row stand for the same values on separate rows. Read a line at
a time, a two-proxy path becomes one opaque string and the order — which is the entire
content of a path vector — is lost.
Tuple Fields§
§0: AddressImplementations§
Source§impl Path
impl Path
Sourcepub fn parse_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
pub fn parse_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse a header value that may carry several comma-separated addresses.
Trait Implementations§
Source§impl TypedHeader for Path
impl TypedHeader for Path
Source§fn decode(value: &[u8]) -> Result<Self, HeaderError>
fn decode(value: &[u8]) -> Result<Self, HeaderError>
Decodes the first address in the value; use Self::parse_list or
crate::message::Headers::typed_all when every one is needed.
Source§const NAME: HeaderName = HeaderName::Path
const NAME: HeaderName = HeaderName::Path
The header this type reads.
Source§fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse every value in one header row. Read more
Source§const VALIDATE_LIST: bool = false
const VALIDATE_LIST: bool = false
Whether
Headers::typed_all must collect and validate the complete field before yielding. Read moreSource§fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
Validate all decoded values of this field across the complete message. Read more
Auto Trait Implementations§
impl !Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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