pub struct SIPCodec { /* private fields */ }
Expand description
§A tokio-codec for sending and receiving SIP messages
SIPCodec
will automatically turn raw text into Message
s, and vice versa. This can
be used to easily interface with tokio streams, as they have built-in support for codecs.
See the Tokio docs on framed streams for more.
Currently, it only supports decoding SIP requests.
Trait Implementations§
Source§impl Decoder for SIPCodec
impl Decoder for SIPCodec
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
impl Copy for SIPCodec
impl Eq for SIPCodec
impl StructuralPartialEq for SIPCodec
Auto Trait Implementations§
impl Freeze for SIPCodec
impl RefUnwindSafe for SIPCodec
impl Send for SIPCodec
impl Sync for SIPCodec
impl Unpin for SIPCodec
impl UnwindSafe for SIPCodec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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