pub enum SipMessage {
Request(Request),
Response(Response),
}Variants§
Implementations§
Source§impl SipMessage
impl SipMessage
pub fn is_request(&self) -> bool
pub fn is_response(&self) -> bool
Sourcepub fn start_line(&self) -> String
pub fn start_line(&self) -> String
The start line (request/status line) of the message — the first line of
its on-wire representation, e.g. CANCEL sip:2001@localhost SIP/2.0 or
SIP/2.0 200 OK. Useful for single-line transport logging without
spilling the multi-line headers/body into the log.
Source§impl SipMessage
impl SipMessage
Trait Implementations§
Source§impl Clone for SipMessage
impl Clone for SipMessage
Source§fn clone(&self) -> SipMessage
fn clone(&self) -> SipMessage
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 SipMessage
impl Debug for SipMessage
Source§impl Display for SipMessage
impl Display for SipMessage
Source§impl Encoder<SipMessage> for SipCodec
impl Encoder<SipMessage> for SipCodec
impl Eq for SipMessage
Source§impl From<Request> for SipMessage
impl From<Request> for SipMessage
Source§fn from(r: Request) -> SipMessage
fn from(r: Request) -> SipMessage
Converts to this type from the input type.
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 From<SipMessage> for String
impl From<SipMessage> for String
Source§fn from(m: SipMessage) -> String
fn from(m: SipMessage) -> String
Converts to this type from the input type.
Source§impl HasHeaders for SipMessage
impl HasHeaders for SipMessage
Source§impl HeadersExt for SipMessage
impl HeadersExt for SipMessage
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 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>
Source§impl PartialEq for SipMessage
impl PartialEq for SipMessage
impl StructuralPartialEq for SipMessage
Source§impl TryFrom<&[u8]> for SipMessage
impl TryFrom<&[u8]> for SipMessage
Source§impl TryFrom<&str> for SipMessage
impl TryFrom<&str> for SipMessage
Source§impl TryFrom<Bytes> for SipMessage
impl TryFrom<Bytes> for SipMessage
Source§impl TryFrom<SipMessage> for Request
impl TryFrom<SipMessage> for Request
Source§impl TryFrom<SipMessage> for Response
impl TryFrom<SipMessage> for Response
Source§impl TryFrom<String> for SipMessage
impl TryFrom<String> for SipMessage
Auto Trait Implementations§
impl Freeze for SipMessage
impl RefUnwindSafe for SipMessage
impl Send for SipMessage
impl Sync for SipMessage
impl Unpin for SipMessage
impl UnsafeUnpin for SipMessage
impl UnwindSafe for SipMessage
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