pub struct Uri {
pub scheme: Option<Scheme>,
pub auth: Option<Auth>,
pub host_with_port: HostWithPort,
pub params: Vec<Param>,
pub headers: Vec<u32>,
}
Expand description
A very flexible SIP(S) URI.
Note that during parsing, if no port is set, it is returned as None
. Usually when no port
is specified then port 5060 is assumed. But rsip is not acting smart here and delegates that
responsibility to you because you might want 5061 (TLS) as default etc.
Similarly on generation, if no port is specified, no port is set at all in the final string.
Fields
scheme: Option<Scheme>
auth: Option<Auth>
host_with_port: HostWithPort
params: Vec<Param>
headers: Vec<u32>
Implementations
Trait Implementations
sourceimpl From<HostWithPort> for Uri
impl From<HostWithPort> for Uri
sourcefn from(host_with_port: HostWithPort) -> Self
fn from(host_with_port: HostWithPort) -> Self
Converts to this type from the input type.
sourceimpl From<SocketAddr> for Uri
impl From<SocketAddr> for Uri
sourcefn from(socket_addr: SocketAddr) -> Self
fn from(socket_addr: SocketAddr) -> Self
Converts to this type from the input type.
impl Eq for Uri
impl StructuralEq for Uri
impl StructuralPartialEq for Uri
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more