pub struct ServerName(/* private fields */);Expand description
A Matrix-spec compliant server name.
It consists of a host and an optional port (separated by a colon if present).
Implementations§
Source§impl ServerName
impl ServerName
Sourcepub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
pub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
Try parsing a &str into a Box<ServerName>.
The same can also be done using FromStr, TryFrom or TryInto.
This function is simply more constrained and thus useful in generic contexts.
Source§impl ServerName
impl ServerName
Source§impl ServerName
impl ServerName
Trait Implementations§
Source§impl AsRef<str> for ServerName
impl AsRef<str> for ServerName
Source§impl Clone for Box<ServerName>
impl Clone for Box<ServerName>
Source§impl Debug for ServerName
impl Debug for ServerName
Source§impl<'de> Deserialize<'de> for Box<ServerName>
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Box<ServerName>
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ServerName
impl Display for ServerName
Source§impl From<&ServerName> for Arc<ServerName>
impl From<&ServerName> for Arc<ServerName>
Source§fn from(s: &ServerName) -> Arc<ServerName>
fn from(s: &ServerName) -> Arc<ServerName>
Converts to this type from the input type.
Source§impl From<&ServerName> for Box<ServerName>
impl From<&ServerName> for Box<ServerName>
Source§fn from(id: &ServerName) -> Self
fn from(id: &ServerName) -> Self
Converts to this type from the input type.
Source§impl From<&ServerName> for Rc<ServerName>
impl From<&ServerName> for Rc<ServerName>
Source§fn from(s: &ServerName) -> Rc<ServerName>
fn from(s: &ServerName) -> Rc<ServerName>
Converts to this type from the input type.
Source§impl FromStr for Box<ServerName>
impl FromStr for Box<ServerName>
Source§impl Hash for ServerName
impl Hash for ServerName
Source§impl Ord for ServerName
impl Ord for ServerName
Source§impl PartialEq<&ServerName> for Box<ServerName>
impl PartialEq<&ServerName> for Box<ServerName>
Source§impl PartialEq<&str> for ServerName
impl PartialEq<&str> for ServerName
Source§impl PartialEq<Box<ServerName>> for &ServerName
impl PartialEq<Box<ServerName>> for &ServerName
Source§impl PartialEq<Box<ServerName>> for ServerName
impl PartialEq<Box<ServerName>> for ServerName
Source§impl PartialEq<ServerName> for &str
impl PartialEq<ServerName> for &str
Source§impl PartialEq<ServerName> for Box<ServerName>
impl PartialEq<ServerName> for Box<ServerName>
Source§impl PartialEq<ServerName> for String
impl PartialEq<ServerName> for String
Source§impl PartialEq<ServerName> for str
impl PartialEq<ServerName> for str
Source§impl PartialEq<String> for ServerName
impl PartialEq<String> for ServerName
Source§impl PartialEq<str> for ServerName
impl PartialEq<str> for ServerName
Source§impl PartialEq for ServerName
impl PartialEq for ServerName
Source§impl PartialOrd for ServerName
impl PartialOrd for ServerName
Source§impl Serialize for ServerName
Available on crate feature serde only.
impl Serialize for ServerName
Available on crate feature
serde only.Source§impl ToOwned for ServerName
impl ToOwned for ServerName
Source§type Owned = Box<ServerName>
type Owned = Box<ServerName>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more