[−][src]Struct libsip::ResponseGenerator
Sip Response Generator. When build is called the struct
is consumed and produces a SipMessage::Response variant.
Calling the code
method before the build
method is
required.
Implementations
impl ResponseGenerator
[src]
pub fn new() -> ResponseGenerator
[src]
Get a new instance of the ResponseGenerator.
pub fn code(self, code: u32) -> ResponseGenerator
[src]
Set the response status code.
pub fn headers(self, headers: Vec<Header>) -> ResponseGenerator
[src]
Add multiple headers to the response header list. This use's Vec::extend so that the current items in the header list are kept.
pub fn header(self, header: Header) -> ResponseGenerator
[src]
Add a single header to the response header list.
pub fn header_ref(&self) -> &Headers
[src]
Get a reference to the header list.
pub fn headers_ref_mut(&mut self) -> &mut Headers
[src]
Get a mutable reference to the header list.
pub fn body(self, body: Vec<u8>) -> ResponseGenerator
[src]
Set the sip response body. This completely replaces the current response body.
pub fn build(self) -> IoResult<SipMessage>
[src]
Create the Sip response.
Trait Implementations
impl Default for ResponseGenerator
[src]
fn default() -> ResponseGenerator
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResponseGenerator
impl Send for ResponseGenerator
impl Sync for ResponseGenerator
impl Unpin for ResponseGenerator
impl UnwindSafe for ResponseGenerator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,