pub struct Response {
pub status_code: StatusCode,
pub version: Version,
pub headers: Headers,
pub body: Vec<u8>,
}Fields§
§status_code: StatusCode§version: Version§headers: Headers§body: Vec<u8>Implementations§
Source§impl Response
impl Response
pub fn status_code(&self) -> &StatusCode
pub fn version(&self) -> &Version
pub fn body(&self) -> &Vec<u8> ⓘ
pub fn body_mut(&mut self) -> &mut Vec<u8> ⓘ
pub fn reason_phrase(&self) -> Option<&str>
Sourcepub fn via_received(&self) -> Option<HostWithPort>
pub fn via_received(&self) -> Option<HostWithPort>
Get the received address from the Via header (including rport if present)
Trait Implementations§
impl Eq for Response
Source§impl From<Response> for SipMessage
impl From<Response> for SipMessage
Source§fn from(r: Response) -> SipMessage
fn from(r: Response) -> SipMessage
Converts to this type from the input type.
Source§impl HasHeaders for Response
impl HasHeaders for Response
Source§impl HeadersExt for Response
impl HeadersExt for Response
fn to_header(&self) -> Result<&To, Error>
fn to_header_mut(&mut self) -> Result<&mut To, Error>
fn from_header(&self) -> Result<&From, Error>
fn from_header_mut(&mut self) -> Result<&mut From, Error>
fn via_header(&self) -> Result<&Via, Error>
fn top_via_header(&self) -> Result<Via, Error>
fn via_header_mut(&mut self) -> Result<&mut Via, Error>
fn call_id_header(&self) -> Result<&CallId, Error>
fn call_id_header_mut(&mut self) -> Result<&mut CallId, Error>
fn cseq_header(&self) -> Result<&CSeq, Error>
fn cseq_header_mut(&mut self) -> Result<&mut CSeq, Error>
fn max_forwards_header(&self) -> Result<&MaxForwards, Error>
fn max_forwards_header_mut(&mut self) -> Result<&mut MaxForwards, Error>
fn contact_header(&self) -> Result<&Contact, Error>
fn contact_header_mut(&mut self) -> Result<&mut Contact, Error>
fn contact_headers(&self) -> Vec<&Contact>
fn typed_contact_headers(&self) -> Result<Vec<Contact>, Error>
fn record_route_headers(&self) -> Vec<&RecordRoute>
fn record_route_header(&self) -> Option<&RecordRoute>
fn typed_record_route_headers(&self) -> Result<Vec<RecordRoute>, Error>
fn route_headers(&self) -> Vec<&Route>
fn route_header(&self) -> Option<&Route>
fn typed_route_headers(&self) -> Result<Vec<Route>, Error>
fn user_agent_header(&self) -> Option<&UserAgent>
fn www_authenticate_header(&self) -> Option<&WwwAuthenticate>
fn expires_header(&self) -> Option<&Expires>
fn min_expires_header(&self) -> Option<&MinExpires>
fn reason_header(&self) -> Option<&Reason>
fn refer_to_header(&self) -> Option<&ReferTo>
fn referred_by_header(&self) -> Option<&ReferredBy>
fn session_expires_header(&self) -> Option<&SessionExpires>
fn p_asserted_identity_header(&self) -> Option<&PAssertedIdentity>
fn call_info_header(&self) -> Option<&CallInfo>
fn call_info_headers(&self) -> Vec<&CallInfo>
fn user_to_user_header(&self) -> Option<&UserToUser>
fn user_to_user_headers(&self) -> Vec<&UserToUser>
fn replaces_header(&self) -> Option<&Replaces>
fn privacy_header(&self) -> Option<&Privacy>
fn path_headers(&self) -> Vec<&Path>
fn rseq_value(&self) -> Option<u32>
fn rack_value(&self) -> Option<(u32, u32, Method)>
fn header_value(&self, name: &str) -> Option<String>
fn header_contains_token(&self, name: &str, token: &str) -> bool
fn transaction_id(&self) -> Result<Option<Branch>, Error>
impl StructuralPartialEq for Response
Source§impl TryFrom<SipMessage> for Response
impl TryFrom<SipMessage> for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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