[][src]Struct libsip::uri::Uri

pub struct Uri {
    pub schema: Option<UriSchema>,
    pub host: Domain,
    pub auth: Option<UriAuth>,
    pub parameters: Vec<UriParam>,
}

Universal Rescource Identifier for libsip.

Fields

schema: Option<UriSchema>host: Domainauth: Option<UriAuth>parameters: Vec<UriParam>

Implementations

impl Uri[src]

pub fn new(schema: UriSchema, host: Domain) -> Uri[src]

pub fn new_schemaless(host: Domain) -> Uri[src]

Create a new Uri without schema.

pub fn sip(host: Domain) -> Uri[src]

Create a new Uri With schema set to Schema::Sip.

pub fn sips(host: Domain) -> Uri[src]

Create a new Uri With schema set to Schema::Sips.

pub fn auth(self, auth: UriAuth) -> Uri[src]

Add a UriAuth section to this Uri.

pub fn authless(self) -> Uri[src]

Remove authentication if there is any.

pub fn parameter(self, p: UriParam) -> Uri[src]

Add a new parameter to the parameter list.

pub fn parameters(self, p: Vec<UriParam>) -> Uri[src]

Add a list of new parameters. This will remove all old parameters.

pub fn schemaless(self) -> Uri[src]

Remove the Schema if there is any.

pub fn schema(self, schema: UriSchema) -> Uri[src]

Set a new Schema.

pub fn host(&self) -> String[src]

Set the host value.

pub fn host_and_params(&self) -> IoResult<String>[src]

Retrieve a formatted string containing host and parameters. This can be used in the Via header.

Trait Implementations

impl Clone for Uri[src]

impl Debug for Uri[src]

impl<'de> Deserialize<'de> for Uri[src]

impl Display for Uri[src]

impl FromStr for Uri[src]

type Err = Err<ErrorKind>

The associated error which can be returned from parsing.

impl PartialEq<Uri> for Uri[src]

impl Serialize for Uri[src]

impl StructuralPartialEq for Uri[src]

Auto Trait Implementations

impl RefUnwindSafe for Uri

impl Send for Uri

impl Sync for Uri

impl Unpin for Uri

impl UnwindSafe for Uri

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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>,