[][src]Struct libsip::MessageWriter

pub struct MessageWriter { /* fields omitted */ }

Structure to help when sending Sip messages. Handles the message CSeq, Call-Id and User-Agent headers.

Implementations

impl MessageWriter[src]

pub fn new(uri: Uri) -> MessageWriter[src]

Create a new MessageWriter. uri is the account uri that will be placed in the From header.

pub fn write_message(
    &mut self,
    body: Vec<u8>,
    to: Uri,
    via_header: Header,
    header_cfg: &HeaderWriteConfig
) -> IoResult<SipMessage>
[src]

Actually produce the SIP Message Request with the given body text.

pub fn cseq(&self) -> Header[src]

Get a new CSeq header.

pub fn content_type(&self) -> Header[src]

Get a new Content-Type header.

pub fn max_forwards(&self) -> Header[src]

Get a new Max-Forwards header.

pub fn call_id(&self) -> Header[src]

Get a new Call-Id header.

pub fn from(&self) -> Header[src]

Get a new From header.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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