Struct rsip::common::uri::host_with_port::HostWithPort
source · [−]Expand description
Simple struct that holds the Host and Port of a SIP(S) uri, reprsented by 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
host: Host
port: Option<Port>
Trait Implementations
sourceimpl Clone for HostWithPort
impl Clone for HostWithPort
sourcefn clone(&self) -> HostWithPort
fn clone(&self) -> HostWithPort
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HostWithPort
impl Debug for HostWithPort
sourceimpl Default for HostWithPort
impl Default for HostWithPort
sourcefn default() -> HostWithPort
fn default() -> HostWithPort
Returns the “default value” for a type. Read more
sourceimpl Display for HostWithPort
impl Display for HostWithPort
sourceimpl From<Domain> for HostWithPort
impl From<Domain> for HostWithPort
sourceimpl From<Host> for HostWithPort
impl From<Host> for HostWithPort
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<IpAddr> for HostWithPort
impl From<IpAddr> for HostWithPort
sourceimpl From<SocketAddr> for HostWithPort
impl From<SocketAddr> for HostWithPort
sourcefn from(socket_addr: SocketAddr) -> Self
fn from(socket_addr: SocketAddr) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<HostWithPort> for HostWithPort
impl PartialEq<HostWithPort> for HostWithPort
sourcefn eq(&self, other: &HostWithPort) -> bool
fn eq(&self, other: &HostWithPort) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HostWithPort) -> bool
fn ne(&self, other: &HostWithPort) -> bool
This method tests for !=
.
sourceimpl TryFrom<&'_ str> for HostWithPort
impl TryFrom<&'_ str> for HostWithPort
sourceimpl TryFrom<String> for HostWithPort
impl TryFrom<String> for HostWithPort
sourceimpl TryInto<SocketAddr> for HostWithPort
impl TryInto<SocketAddr> for HostWithPort
impl Eq for HostWithPort
impl StructuralEq for HostWithPort
impl StructuralPartialEq for HostWithPort
Auto Trait Implementations
impl RefUnwindSafe for HostWithPort
impl Send for HostWithPort
impl Sync for HostWithPort
impl Unpin for HostWithPort
impl UnwindSafe for HostWithPort
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more