pub struct LinkHost { /* private fields */ }
Expand description
The host portion of a Link
(e.g. “http://127.0.0.1:8702”)
Implementations§
source§impl LinkHost
impl LinkHost
pub fn new(
protocol: LinkProtocol,
address: LinkAddress,
port: Option<u16>
) -> Self
pub fn address(&self) -> &LinkAddress
pub fn port(&self) -> &Option<u16>
pub fn protocol(&self) -> &LinkProtocol
Trait Implementations§
source§impl<'de> Deserialize<'de> for LinkHost
impl<'de> Deserialize<'de> for LinkHost
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<A: Into<LinkAddress>> From<(LinkProtocol, A, Option<u16>)> for LinkHost
impl<A: Into<LinkAddress>> From<(LinkProtocol, A, Option<u16>)> for LinkHost
source§impl Ord for LinkHost
impl Ord for LinkHost
source§impl PartialEq<LinkHost> for LinkHost
impl PartialEq<LinkHost> for LinkHost
source§impl PartialEq<String> for LinkHost
impl PartialEq<String> for LinkHost
source§impl PartialEq<TCString> for LinkHost
impl PartialEq<TCString> for LinkHost
source§impl PartialOrd<LinkHost> for LinkHost
impl PartialOrd<LinkHost> for LinkHost
1.0.0 · source§fn 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 moresource§impl TryCastFrom<Value> for LinkHost
impl TryCastFrom<Value> for LinkHost
source§fn can_cast_from(value: &Value) -> bool
fn can_cast_from(value: &Value) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(value: Value) -> Option<Self>
fn opt_cast_from(value: Value) -> Option<Self>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.impl Eq for LinkHost
impl StructuralEq for LinkHost
impl StructuralPartialEq for LinkHost
Auto Trait Implementations§
impl RefUnwindSafe for LinkHost
impl Send for LinkHost
impl Sync for LinkHost
impl Unpin for LinkHost
impl UnwindSafe for LinkHost
Blanket Implementations§
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.