pub struct ForwardedElement<'fe> { /* private fields */ }
Expand description
A Rust representation of the RFC 7329
forwarded-element
production.
Implementations§
Source§impl<'fe, 'input: 'fe> ForwardedElement<'fe>
impl<'fe, 'input: 'fe> ForwardedElement<'fe>
Sourcepub fn parse(
input: &'input str,
) -> Result<(Self, &'input str), ForwardedElementError>
pub fn parse( input: &'input str, ) -> Result<(Self, &'input str), ForwardedElementError>
Parses a string conforming to the RFC
7329 forwarded-element
ABNF production
into a ForwardedElement
Sourcepub fn into_owned(self) -> ForwardedElement<'static>
pub fn into_owned(self) -> ForwardedElement<'static>
Transforms a borrowed ForwardedElement
into an owned `ForwardedElement.
Sourcepub fn set_by(
&mut self,
by: impl Into<Cow<'input, str>>,
) -> Result<(), ForwardedElementError>
pub fn set_by( &mut self, by: impl Into<Cow<'input, str>>, ) -> Result<(), ForwardedElementError>
Sets the by
parameter value.
Sourcepub fn set_for(
&mut self,
forwarded_for: impl Into<Cow<'input, str>>,
) -> Result<(), ForwardedElementError>
pub fn set_for( &mut self, forwarded_for: impl Into<Cow<'input, str>>, ) -> Result<(), ForwardedElementError>
Sets the for
parameter value.
Sourcepub fn set_host(
&mut self,
host: impl Into<Cow<'input, str>>,
) -> Result<(), ForwardedElementError>
pub fn set_host( &mut self, host: impl Into<Cow<'input, str>>, ) -> Result<(), ForwardedElementError>
Sets the host
parameter value
Sourcepub fn set_proto(
&mut self,
proto: impl Into<Cow<'input, str>>,
) -> Result<(), ForwardedElementError>
pub fn set_proto( &mut self, proto: impl Into<Cow<'input, str>>, ) -> Result<(), ForwardedElementError>
Sets the proto
parameter value.
Sourcepub fn set_extension(
&mut self,
parameter: impl Into<Cow<'input, str>>,
value: impl Into<Cow<'input, str>>,
) -> Result<Option<Cow<'fe, str>>, ForwardedElementError>
pub fn set_extension( &mut self, parameter: impl Into<Cow<'input, str>>, value: impl Into<Cow<'input, str>>, ) -> Result<Option<Cow<'fe, str>>, ForwardedElementError>
Sets an extension parameter value.
Trait Implementations§
Source§impl<'fe> Clone for ForwardedElement<'fe>
impl<'fe> Clone for ForwardedElement<'fe>
Source§fn clone(&self) -> ForwardedElement<'fe>
fn clone(&self) -> ForwardedElement<'fe>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'fe> Debug for ForwardedElement<'fe>
impl<'fe> Debug for ForwardedElement<'fe>
Source§impl<'fe> Default for ForwardedElement<'fe>
impl<'fe> Default for ForwardedElement<'fe>
Source§fn default() -> ForwardedElement<'fe>
fn default() -> ForwardedElement<'fe>
Returns the “default value” for a type. Read more
Source§impl<'fe> Display for ForwardedElement<'fe>
impl<'fe> Display for ForwardedElement<'fe>
Source§impl<'fe> PartialEq for ForwardedElement<'fe>
impl<'fe> PartialEq for ForwardedElement<'fe>
impl<'fe> Eq for ForwardedElement<'fe>
impl<'fe> StructuralPartialEq for ForwardedElement<'fe>
Auto Trait Implementations§
impl<'fe> Freeze for ForwardedElement<'fe>
impl<'fe> RefUnwindSafe for ForwardedElement<'fe>
impl<'fe> Send for ForwardedElement<'fe>
impl<'fe> Sync for ForwardedElement<'fe>
impl<'fe> Unpin for ForwardedElement<'fe>
impl<'fe> UnwindSafe for ForwardedElement<'fe>
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