pub struct TransportId(/* private fields */);
Expand description
Identify a type of Transport.
If this crate is compiled with the pt-client
feature, this type can
support pluggable transports; otherwise, only the built-in transport type is
supported.
This can be displayed as, or parsed from, a string.
"-"
is used to indicate the builtin transport,
and ""
and "bridge"
and "<none>"
are also recognised for that.
Implementations§
Source§impl TransportId
impl TransportId
Sourcepub fn new_builtin() -> Self
pub fn new_builtin() -> Self
Return a new TransportId
referencing the builtin transport
This is equivalent to the Default
impl.
Sourcepub fn new_pluggable(pt: PtTransportName) -> Self
Available on crate feature pt-client
only.
pub fn new_pluggable(pt: PtTransportName) -> Self
pt-client
only.Return a new TransportId
referencing a pluggable transport
This is equivalent to the From<PtTransportName>
impl.
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Return true if this is the built-in transport.
Sourcepub fn as_pluggable(&self) -> Option<&PtTransportName>
Available on crate feature pt-client
only.
pub fn as_pluggable(&self) -> Option<&PtTransportName>
pt-client
only.Returns the pluggable transport name
Or None
if self
doesn’t specify a pluggable transport
(e.g. if it specifies the builtin transport).
Sourcepub fn into_pluggable(self) -> Option<PtTransportName>
Available on crate feature pt-client
only.
pub fn into_pluggable(self) -> Option<PtTransportName>
pt-client
only.Consumes this TransportId
and returns the pluggable transport name
Or None
if self
doesn’t specify a pluggable transport
(e.g. if it specifies the builtin transport).
Trait Implementations§
Source§impl Clone for TransportId
impl Clone for TransportId
Source§fn clone(&self) -> TransportId
fn clone(&self) -> TransportId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TransportId
impl Debug for TransportId
Source§impl Default for TransportId
impl Default for TransportId
Source§fn default() -> TransportId
fn default() -> TransportId
Source§impl Display for TransportId
impl Display for TransportId
Source§impl From<PtTransportName> for TransportId
Available on crate feature pt-client
only.
impl From<PtTransportName> for TransportId
pt-client
only.Source§fn from(name: PtTransportName) -> Self
fn from(name: PtTransportName) -> Self
Source§impl FromStr for TransportId
impl FromStr for TransportId
Source§impl Hash for TransportId
impl Hash for TransportId
Source§impl PartialEq for TransportId
impl PartialEq for TransportId
impl Eq for TransportId
impl StructuralPartialEq for TransportId
Auto Trait Implementations§
impl Freeze for TransportId
impl RefUnwindSafe for TransportId
impl Send for TransportId
impl Sync for TransportId
impl Unpin for TransportId
impl UnwindSafe for TransportId
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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 more