Struct ruma_identifiers::ServerName
source · [−]#[repr(transparent)]pub struct ServerName(_);
Expand description
A Matrix-spec compliant server name.
It consists of a host and an optional port (separated by a colon if present).
Implementations
sourceimpl 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.
sourceimpl ServerName
impl ServerName
sourceimpl ServerName
impl ServerName
Trait Implementations
sourceimpl AsRef<str> for ServerName
impl AsRef<str> for ServerName
sourceimpl Debug for ServerName
impl Debug for ServerName
sourceimpl Display for ServerName
impl Display for ServerName
sourceimpl From<&'_ ServerName> for Box<ServerName>
impl From<&'_ ServerName> for Box<ServerName>
sourcefn from(id: &ServerName) -> Self
fn from(id: &ServerName) -> Self
Converts to this type from the input type.
sourceimpl From<&'_ ServerName> for Rc<ServerName>
impl From<&'_ ServerName> for Rc<ServerName>
sourcefn from(s: &ServerName) -> Rc<ServerName>
fn from(s: &ServerName) -> Rc<ServerName>
Converts to this type from the input type.
sourceimpl From<&'_ ServerName> for Arc<ServerName>
impl From<&'_ ServerName> for Arc<ServerName>
sourcefn from(s: &ServerName) -> Arc<ServerName>
fn from(s: &ServerName) -> Arc<ServerName>
Converts to this type from the input type.
sourceimpl Hash for ServerName
impl Hash for ServerName
sourceimpl Ord for ServerName
impl Ord for ServerName
sourceimpl PartialEq<&'_ ServerName> for Box<ServerName>
impl PartialEq<&'_ ServerName> for Box<ServerName>
sourceimpl PartialEq<&'_ str> for ServerName
impl PartialEq<&'_ str> for ServerName
sourceimpl PartialEq<Box<ServerName, Global>> for ServerName
impl PartialEq<Box<ServerName, Global>> for ServerName
sourceimpl PartialEq<Box<ServerName, Global>> for &ServerName
impl PartialEq<Box<ServerName, Global>> for &ServerName
sourceimpl PartialEq<ServerName> for ServerName
impl PartialEq<ServerName> for ServerName
sourcefn eq(&self, other: &ServerName) -> bool
fn eq(&self, other: &ServerName) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ServerName) -> bool
fn ne(&self, other: &ServerName) -> bool
This method tests for !=
.
sourceimpl PartialEq<ServerName> for Box<ServerName>
impl PartialEq<ServerName> for Box<ServerName>
sourceimpl PartialEq<ServerName> for str
impl PartialEq<ServerName> for str
sourceimpl PartialEq<ServerName> for &str
impl PartialEq<ServerName> for &str
sourceimpl PartialEq<ServerName> for String
impl PartialEq<ServerName> for String
sourceimpl PartialEq<String> for ServerName
impl PartialEq<String> for ServerName
sourceimpl PartialEq<str> for ServerName
impl PartialEq<str> for ServerName
sourceimpl PartialOrd<ServerName> for ServerName
impl PartialOrd<ServerName> for ServerName
sourcefn partial_cmp(&self, other: &ServerName) -> Option<Ordering>
fn partial_cmp(&self, other: &ServerName) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for ServerName
Available on crate feature serde
only.
impl Serialize for ServerName
serde
only.sourceimpl ToOwned for ServerName
impl ToOwned for ServerName
type Owned = Box<ServerName, Global>
type Owned = Box<ServerName, Global>
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
sourcefn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more