Struct OwnedServerName
pub struct OwnedServerName { /* private fields */ }Expand description
Owned variant of ServerName
§Inner representation
By default, this type uses a Box<str> internally. The inner representation can be selected at
compile time by using one of the following supported values:
Arc– Use anArc<str>.
The selected value can be set by using the ruma_identifiers_storage compile-time cfg setting.
This setting can be configured using the RUSTFLAGS environment variable at build time, like this:
RUSTFLAGS="--cfg ruma_identifiers_storage=\"{value}\""Or in .cargo/config.toml:
# General setting for all targets, overridden by per-target `rustflags` setting if set.
[build]
rustflags = ["--cfg", "ruma_identifiers_storage=\"{value}\""]
# Per-target setting.
[target.<triple/cfg>]
rustflags = ["--cfg", "ruma_identifiers_storage=\"{value}\""]This setting can also be configured using the RUMA_IDENTIFIERS_STORAGE environment variable at
compile time, which has the benefit of not requiring to re-compile the whole dependency chain
when the value is changed, like this:
RUMA_IDENTIFIERS_STORAGE="{value}"Methods from Deref<Target = ServerName>§
pub fn host(&self) -> &str
pub fn host(&self) -> &str
Returns the host of the server name.
That is: Return the part of the server name before :<port> or the full server name if
there is no port.
pub fn is_ip_literal(&self) -> bool
pub fn is_ip_literal(&self) -> bool
Returns true if and only if the server name is an IPv4 or IPv6 address.
Trait Implementations§
§impl AsRef<[u8]> for OwnedServerName
impl AsRef<[u8]> for OwnedServerName
§impl AsRef<ServerName> for OwnedServerName
impl AsRef<ServerName> for OwnedServerName
§fn as_ref(&self) -> &ServerName
fn as_ref(&self) -> &ServerName
§impl AsRef<str> for OwnedServerName
impl AsRef<str> for OwnedServerName
§impl Borrow<ServerName> for OwnedServerName
impl Borrow<ServerName> for OwnedServerName
§fn borrow(&self) -> &ServerName
fn borrow(&self) -> &ServerName
§impl Clone for OwnedServerName
impl Clone for OwnedServerName
§fn clone(&self) -> OwnedServerName
fn clone(&self) -> OwnedServerName
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for OwnedServerName
impl Debug for OwnedServerName
§impl Deref for OwnedServerName
impl Deref for OwnedServerName
§type Target = ServerName
type Target = ServerName
§fn deref(&self) -> &<OwnedServerName as Deref>::Target
fn deref(&self) -> &<OwnedServerName as Deref>::Target
§impl<'de> Deserialize<'de> for OwnedServerName
impl<'de> Deserialize<'de> for OwnedServerName
§fn deserialize<D>(
deserializer: D,
) -> Result<OwnedServerName, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OwnedServerName, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for OwnedServerName
impl Display for OwnedServerName
§impl From<&ServerName> for OwnedServerName
impl From<&ServerName> for OwnedServerName
§fn from(id: &ServerName) -> OwnedServerName
fn from(id: &ServerName) -> OwnedServerName
§impl From<OwnedServerName> for Box<str>
impl From<OwnedServerName> for Box<str>
§fn from(id: OwnedServerName) -> Box<str>
fn from(id: OwnedServerName) -> Box<str>
§impl From<OwnedServerName> for String
impl From<OwnedServerName> for String
§fn from(id: OwnedServerName) -> String
fn from(id: OwnedServerName) -> String
§impl FromStr for OwnedServerName
impl FromStr for OwnedServerName
§impl Hash for OwnedServerName
impl Hash for OwnedServerName
§impl Ord for OwnedServerName
impl Ord for OwnedServerName
§impl PartialEq<&ServerName> for OwnedServerName
impl PartialEq<&ServerName> for OwnedServerName
§impl PartialEq<&str> for OwnedServerName
impl PartialEq<&str> for OwnedServerName
§impl<'a> PartialEq<Cow<'a, str>> for OwnedServerName
impl<'a> PartialEq<Cow<'a, str>> for OwnedServerName
§impl PartialEq<OwnedServerName> for &ServerName
impl PartialEq<OwnedServerName> for &ServerName
§impl PartialEq<OwnedServerName> for &str
impl PartialEq<OwnedServerName> for &str
§impl PartialEq<OwnedServerName> for ServerName
impl PartialEq<OwnedServerName> for ServerName
§impl PartialEq<OwnedServerName> for String
impl PartialEq<OwnedServerName> for String
§impl PartialEq<OwnedServerName> for str
impl PartialEq<OwnedServerName> for str
§impl PartialEq<ServerName> for OwnedServerName
impl PartialEq<ServerName> for OwnedServerName
§impl PartialEq<String> for OwnedServerName
impl PartialEq<String> for OwnedServerName
§impl PartialEq<str> for OwnedServerName
impl PartialEq<str> for OwnedServerName
§impl PartialEq for OwnedServerName
impl PartialEq for OwnedServerName
§impl PartialOrd for OwnedServerName
impl PartialOrd for OwnedServerName
§impl Serialize for OwnedServerName
impl Serialize for OwnedServerName
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§impl TryFrom<&str> for OwnedServerName
impl TryFrom<&str> for OwnedServerName
§impl TryFrom<Box<str>> for OwnedServerName
impl TryFrom<Box<str>> for OwnedServerName
§impl<'a> TryFrom<Cow<'a, str>> for OwnedServerName
impl<'a> TryFrom<Cow<'a, str>> for OwnedServerName
§impl TryFrom<String> for OwnedServerName
impl TryFrom<String> for OwnedServerName
impl Eq for OwnedServerName
Auto Trait Implementations§
impl Freeze for OwnedServerName
impl RefUnwindSafe for OwnedServerName
impl Send for OwnedServerName
impl Sync for OwnedServerName
impl Unpin for OwnedServerName
impl UnsafeUnpin for OwnedServerName
impl UnwindSafe for OwnedServerName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> DeserialiseFromJs for Twhere
T: DeserializeOwned,
impl<T> DeserialiseFromJs for Twhere
T: DeserializeOwned,
Source§fn deserialise_from_js(js: JsValue) -> Result<T, Error>
fn deserialise_from_js(js: JsValue) -> Result<T, Error>
serde_wasm_bindgen.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
Source§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Source§impl<Ctx, T> MeasureWith<Ctx> for T
impl<Ctx, T> MeasureWith<Ctx> for T
Source§fn measure_with(&self, _ctx: &Ctx) -> usize
fn measure_with(&self, _ctx: &Ctx) -> usize
Self, given the ctx?Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerialiseToJs for Twhere
T: Serialize,
impl<T> SerialiseToJs for Twhere
T: Serialize,
Source§fn serialise_to_js(&self) -> Result<JsValue, Error>
fn serialise_to_js(&self) -> Result<JsValue, Error>
JsValue, most likely using serde_wasm_bindgen.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.