Skip to main content

Request

Struct Request 

Source
pub struct Request {
    pub method: Method,
    pub uri: Uri,
    pub version: Version,
    pub headers: Headers,
    pub body: Vec<u8>,
}

Fields§

§method: Method§uri: Uri§version: Version§headers: Headers§body: Vec<u8>

Implementations§

Source§

impl Request

Source

pub fn method(&self) -> &Method

Source

pub fn uri(&self) -> &Uri

Source

pub fn destination(&self) -> Uri

Source

pub fn version(&self) -> &Version

Source

pub fn body(&self) -> &Vec<u8>

Source

pub fn body_mut(&mut self) -> &mut Vec<u8>

Trait Implementations§

Source§

impl Clone for Request

Source§

fn clone(&self) -> Request

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Request

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Request

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Request> for SipMessage

Source§

fn from(r: Request) -> SipMessage

Converts to this type from the input type.
Source§

impl From<Request> for String

Source§

fn from(r: Request) -> String

Converts to this type from the input type.
Source§

impl From<Request> for Vec<u8>

Source§

fn from(r: Request) -> Vec<u8>

Converts to this type from the input type.
Source§

impl HasHeaders for Request

Source§

fn headers(&self) -> &Headers

Source§

fn headers_mut(&mut self) -> &mut Headers

Source§

impl HeadersExt for Request

Source§

fn to_header(&self) -> Result<&To, Error>

Source§

fn to_header_mut(&mut self) -> Result<&mut To, Error>

Source§

fn from_header(&self) -> Result<&From, Error>

Source§

fn from_header_mut(&mut self) -> Result<&mut From, Error>

Source§

fn via_header(&self) -> Result<&Via, Error>

Source§

fn via_header_mut(&mut self) -> Result<&mut Via, Error>

Source§

fn call_id_header(&self) -> Result<&CallId, Error>

Source§

fn call_id_header_mut(&mut self) -> Result<&mut CallId, Error>

Source§

fn cseq_header(&self) -> Result<&CSeq, Error>

Source§

fn cseq_header_mut(&mut self) -> Result<&mut CSeq, Error>

Source§

fn max_forwards_header(&self) -> Result<&MaxForwards, Error>

Source§

fn max_forwards_header_mut(&mut self) -> Result<&mut MaxForwards, Error>

Source§

fn contact_header(&self) -> Result<&Contact, Error>

Source§

fn contact_header_mut(&mut self) -> Result<&mut Contact, Error>

Source§

fn contact_headers(&self) -> Vec<&Contact>

Source§

fn typed_contact_headers(&self) -> Result<Vec<Contact>, Error>

Source§

fn record_route_headers(&self) -> Vec<&RecordRoute>

Source§

fn record_route_header(&self) -> Option<&RecordRoute>

Source§

fn typed_record_route_headers(&self) -> Result<Vec<RecordRoute>, Error>

Source§

fn route_headers(&self) -> Vec<&Route>

Source§

fn route_header(&self) -> Option<&Route>

Source§

fn typed_route_headers(&self) -> Result<Vec<Route>, Error>

Source§

fn user_agent_header(&self) -> Option<&UserAgent>

Source§

fn authorization_header(&self) -> Option<&Authorization>

Source§

fn www_authenticate_header(&self) -> Option<&WwwAuthenticate>

Source§

fn expires_header(&self) -> Option<&Expires>

Source§

fn min_expires_header(&self) -> Option<&MinExpires>

Source§

fn reason_header(&self) -> Option<&Reason>

Source§

fn refer_to_header(&self) -> Option<&ReferTo>

Source§

fn referred_by_header(&self) -> Option<&ReferredBy>

Source§

fn session_expires_header(&self) -> Option<&SessionExpires>

Source§

fn p_asserted_identity_header(&self) -> Option<&PAssertedIdentity>

Source§

fn replaces_header(&self) -> Option<&Replaces>

Source§

fn privacy_header(&self) -> Option<&Privacy>

Source§

fn path_headers(&self) -> Vec<&Path>

Source§

fn rseq_value(&self) -> Option<u32>

Source§

fn rack_value(&self) -> Option<(u32, u32, Method)>

Source§

fn header_value(&self, name: &str) -> Option<String>

Source§

fn header_contains_token(&self, name: &str, token: &str) -> bool

Source§

fn transaction_id(&self) -> Result<Option<Branch>, Error>

Source§

impl PartialEq for Request

Source§

fn eq(&self, other: &Request) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&[u8]> for Request

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: &[u8]) -> Result<Self, Error>

Performs the conversion.
Source§

impl TryFrom<&str> for Request

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Self, Error>

Performs the conversion.
Source§

impl TryFrom<SipMessage> for Request

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(m: SipMessage) -> Result<Self, Error>

Performs the conversion.
Source§

impl TryFrom<String> for Request

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(s: String) -> Result<Self, Error>

Performs the conversion.
Source§

impl TryFrom<Vec<u8>> for Request

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: Vec<u8>) -> Result<Self, Error>

Performs the conversion.
Source§

impl Eq for Request

Source§

impl StructuralPartialEq for Request

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,