pub struct HostWithPort {
pub host: Host,
pub port: Option<Port>,
}
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§
Source§impl Clone for HostWithPort
impl Clone for HostWithPort
Source§fn clone(&self) -> HostWithPort
fn clone(&self) -> HostWithPort
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HostWithPort
impl Debug for HostWithPort
Source§impl Default for HostWithPort
impl Default for HostWithPort
Source§fn default() -> HostWithPort
fn default() -> HostWithPort
Returns the “default value” for a type. Read more
Source§impl Display for HostWithPort
impl Display for HostWithPort
Source§impl<H, P> From<(H, Option<P>)> for HostWithPort
impl<H, P> From<(H, Option<P>)> for HostWithPort
Source§impl<H, P> From<(H, P)> for HostWithPort
impl<H, P> From<(H, P)> for HostWithPort
Source§impl From<Domain> for HostWithPort
impl From<Domain> for HostWithPort
Source§impl From<Host> for HostWithPort
impl From<Host> for HostWithPort
Source§impl From<HostWithPort> for Uri
impl From<HostWithPort> for Uri
Source§fn from(host_with_port: HostWithPort) -> Self
fn from(host_with_port: HostWithPort) -> Self
Converts to this type from the input type.
Source§impl From<IpAddr> for HostWithPort
impl From<IpAddr> for HostWithPort
Source§impl From<SocketAddr> for HostWithPort
impl From<SocketAddr> for HostWithPort
Source§fn from(socket_addr: SocketAddr) -> Self
fn from(socket_addr: SocketAddr) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HostWithPort
impl PartialEq for HostWithPort
Source§impl TryFrom<&str> for HostWithPort
impl TryFrom<&str> for HostWithPort
Source§impl TryFrom<String> for HostWithPort
impl TryFrom<String> for HostWithPort
Source§impl TryInto<SocketAddr> for HostWithPort
impl TryInto<SocketAddr> for HostWithPort
impl Eq for HostWithPort
impl StructuralPartialEq for HostWithPort
Auto Trait Implementations§
impl Freeze for HostWithPort
impl RefUnwindSafe for HostWithPort
impl Send for HostWithPort
impl Sync for HostWithPort
impl Unpin for HostWithPort
impl UnwindSafe for HostWithPort
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more