pub(crate) enum ProtocolInner<'s> {
Proto(ProtoKind),
Unrecognized(Cow<'s, str>),
}Expand description
Representation for a known or unknown protocol.
Variants§
Proto(ProtoKind)
A known protocol; represented by one of ProtoKind.
ProtoKind must always be in the range 0..N_RECOGNIZED.
Unrecognized(Cow<'s, str>)
An unknown protocol; represented by its name.
Invariant: is legal syntax, is not a recognized name
Implementations§
Source§impl<'s> ProtocolInner<'s>
impl<'s> ProtocolInner<'s>
Sourcepub(crate) fn as_ref(&self) -> ProtocolInner<'_>
pub(crate) fn as_ref(&self) -> ProtocolInner<'_>
Borrow from a ProtocolInner
Gives a new owned ProtocolInner which borrows from self.
Sourcepub(crate) fn into_static(self) -> ProtocolInner<'static>
pub(crate) fn into_static(self) -> ProtocolInner<'static>
Make a static ProtocolInner
Returns a new owned ProtocolInner describing the same Protocol as self.
Trait Implementations§
Source§impl<'s> Clone for ProtocolInner<'s>
impl<'s> Clone for ProtocolInner<'s>
Source§impl<'s> Debug for ProtocolInner<'s>
impl<'s> Debug for ProtocolInner<'s>
Source§impl<'s> Display for ProtocolInner<'s>
impl<'s> Display for ProtocolInner<'s>
impl<'s> Eq for ProtocolInner<'s>
Source§impl<'s> Hash for ProtocolInner<'s>
impl<'s> Hash for ProtocolInner<'s>
Source§impl<'s> Ord for ProtocolInner<'s>
impl<'s> Ord for ProtocolInner<'s>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'s> PartialEq for ProtocolInner<'s>
impl<'s> PartialEq for ProtocolInner<'s>
Source§impl<'s> PartialOrd for ProtocolInner<'s>
impl<'s> PartialOrd for ProtocolInner<'s>
impl<'s> StructuralPartialEq for ProtocolInner<'s>
Auto Trait Implementations§
impl<'s> Forget for ProtocolInner<'s>
impl<'s> Freeze for ProtocolInner<'s>
impl<'s> Move for ProtocolInner<'s>
impl<'s> RefUnwindSafe for ProtocolInner<'s>
impl<'s> Send for ProtocolInner<'s>
impl<'s> Sync for ProtocolInner<'s>
impl<'s> Unpin for ProtocolInner<'s>
impl<'s> UnsafeUnpin for ProtocolInner<'s>
impl<'s> UnwindSafe for ProtocolInner<'s>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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