pub struct ServiceRoute(pub Address);Expand description
The Service-Route header (RFC 3608 §5).
sr-value = name-addr *( SEMI rr-param ), comma-separated — the same list grammar the
other route headers have, and list semantics for the same reason: RFC 3608 §6.1 requires
a UA that exercises a service route to “preserve the order”, and order is exactly what is
lost when a comma-joined row is read as one opaque value.
Tuple Fields§
§0: AddressImplementations§
Source§impl ServiceRoute
impl ServiceRoute
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 Clone for ServiceRoute
impl Clone for ServiceRoute
Source§fn clone(&self) -> ServiceRoute
fn clone(&self) -> ServiceRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceRoute
impl Debug for ServiceRoute
Source§impl Deref for ServiceRoute
impl Deref for ServiceRoute
Source§impl TypedHeader for ServiceRoute
impl TypedHeader for ServiceRoute
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::ServiceRoute
const NAME: HeaderName = HeaderName::ServiceRoute
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 ServiceRoute
impl RefUnwindSafe for ServiceRoute
impl Send for ServiceRoute
impl Sync for ServiceRoute
impl Unpin for ServiceRoute
impl UnsafeUnpin for ServiceRoute
impl UnwindSafe for ServiceRoute
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