Enum ApplicationProtocol
pub enum ApplicationProtocol {
Show 36 variants
HTTP_09,
HTTP_10,
HTTP_11,
SPDY_1,
SPDY_2,
SPDY_3,
STUN_TURN,
STUN_NAT_DISCOVERY,
HTTP_2,
HTTP_2_TCP,
WebRTC,
CWebRTC,
FTP,
IMAP,
POP3,
ManageSieve,
CoAP_TLS,
CoAP_DTLS,
XMPP_CLIENT,
XMPP_SERVER,
ACME_TLS,
MQTT,
DNS_OVER_TLS,
NTSKE_1,
SunRPC,
HTTP_3,
SMB2,
IRC,
NNTP,
NNSP,
DoQ,
SIP,
TDS_80,
DICOM,
PostgreSQL,
Unknown(Vec<u8>),
}net only.Expand description
An Application-Layer Protocol Negotiation identifier.
Known values come from the IANA ALPN Protocol IDs registry. RFC 7301 protocol names contain between one and 255 octets on the wire.
Variants§
HTTP_09
HTTP/0.9.
HTTP_10
HTTP/1.0.
HTTP_11
HTTP/1.1.
SPDY_1
SPDY version 1.
SPDY_2
SPDY version 2.
SPDY_3
SPDY version 3.
STUN_TURN
Traversal Using Relays around NAT.
STUN_NAT_DISCOVERY
NAT discovery using Session Traversal Utilities for NAT.
HTTP_2
HTTP/2 over TLS.
HTTP_2_TCP
Cleartext HTTP/2.
WebRTC
Web Real-Time Communication.
CWebRTC
Confidential Web Real-Time Communication.
FTP
File Transfer Protocol.
IMAP
Internet Message Access Protocol.
POP3
Post Office Protocol version 3.
ManageSieve
ManageSieve protocol.
CoAP_TLS
Constrained Application Protocol over TLS.
CoAP_DTLS
Constrained Application Protocol over DTLS.
XMPP_CLIENT
XMPP client-to-server connections.
XMPP_SERVER
XMPP server-to-server connections.
ACME_TLS
ACME TLS application protocol.
MQTT
Message Queuing Telemetry Transport.
DNS_OVER_TLS
DNS over TLS.
NTSKE_1
Network Time Security key establishment.
SunRPC
Sun Remote Procedure Call.
HTTP_3
HTTP/3.
SMB2
Server Message Block version 2.
IRC
Internet Relay Chat.
NNTP
Network News Transfer Protocol.
NNSP
Network News Transfer Protocol historical alias.
DoQ
DNS over QUIC.
SIP
Session Initiation Protocol version 2.
TDS_80
Tabular Data Stream version 8.0.
DICOM
Digital Imaging and Communications in Medicine.
PostgreSQL
PostgreSQL wire protocol.
Unknown(Vec<u8>)
Retains an unrecognized byte sequence.
Implementations§
§impl ApplicationProtocol
impl ApplicationProtocol
§impl ApplicationProtocol
impl ApplicationProtocol
pub fn encode_wire_format(
&self,
writer: &mut impl Write,
) -> Result<usize, Error>
Available on crate feature std only.
pub fn encode_wire_format( &self, writer: &mut impl Write, ) -> Result<usize, Error>
std only.Encode one RFC 7301 length-prefixed protocol name.
§Errors
Returns std::io::ErrorKind::InvalidData when the identifier is empty
or exceeds 255 octets, and forwards writer errors.
pub fn decode_wire_format(
reader: &mut impl Read,
) -> Result<ApplicationProtocol, Error>
Available on crate feature std only.
pub fn decode_wire_format( reader: &mut impl Read, ) -> Result<ApplicationProtocol, Error>
std only.Decode one RFC 7301 length-prefixed protocol name.
§Errors
Returns std::io::ErrorKind::InvalidData for an empty identifier and
forwards reader errors.
pub fn encode_alpns(alpns: &[ApplicationProtocol]) -> Result<Bytes, Error>
Available on crate feature std only.
pub fn encode_alpns(alpns: &[ApplicationProtocol]) -> Result<Bytes, Error>
std only.Encode consecutive RFC 7301 length-prefixed protocol names.
An empty slice produces an empty buffer, allowing callers to represent an omitted ALPN offer.
§Errors
Returns an error when any protocol name is invalid or writing fails.
Trait Implementations§
§impl Clone for ApplicationProtocol
impl Clone for ApplicationProtocol
§fn clone(&self) -> ApplicationProtocol
fn clone(&self) -> ApplicationProtocol
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ApplicationProtocol
impl Debug for ApplicationProtocol
§impl<'de> Deserialize<'de> for ApplicationProtocol
impl<'de> Deserialize<'de> for ApplicationProtocol
§fn deserialize<D>(
deserializer: D,
) -> Result<ApplicationProtocol, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ApplicationProtocol, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for ApplicationProtocol
impl Display for ApplicationProtocol
impl Eq for ApplicationProtocol
§impl<'a, const N: usize> From<&'a [u8; N]> for ApplicationProtocol
impl<'a, const N: usize> From<&'a [u8; N]> for ApplicationProtocol
§fn from(b: &'a [u8; N]) -> ApplicationProtocol
fn from(b: &'a [u8; N]) -> ApplicationProtocol
§impl<'a> From<&'a [u8]> for ApplicationProtocol
impl<'a> From<&'a [u8]> for ApplicationProtocol
§fn from(b: &'a [u8]) -> ApplicationProtocol
fn from(b: &'a [u8]) -> ApplicationProtocol
§impl<'a> From<&'a str> for ApplicationProtocol
impl<'a> From<&'a str> for ApplicationProtocol
§fn from(s: &'a str) -> ApplicationProtocol
fn from(s: &'a str) -> ApplicationProtocol
§impl From<&ApplicationProtocol> for Vec<u8>
impl From<&ApplicationProtocol> for Vec<u8>
§impl From<ApplicationProtocol> for Vec<u8>
impl From<ApplicationProtocol> for Vec<u8>
§impl From<String> for ApplicationProtocol
impl From<String> for ApplicationProtocol
§fn from(s: String) -> ApplicationProtocol
fn from(s: String) -> ApplicationProtocol
§impl From<Vec<u8>> for ApplicationProtocol
impl From<Vec<u8>> for ApplicationProtocol
§fn from(b: Vec<u8>) -> ApplicationProtocol
fn from(b: Vec<u8>) -> ApplicationProtocol
§impl FromStr for ApplicationProtocol
impl FromStr for ApplicationProtocol
§impl Hash for ApplicationProtocol
impl Hash for ApplicationProtocol
§impl PartialEq for ApplicationProtocol
impl PartialEq for ApplicationProtocol
§impl Serialize for ApplicationProtocol
impl Serialize for ApplicationProtocol
§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 StructuralPartialEq for ApplicationProtocol
§impl TraceField for ApplicationProtocol
Available on crate feature dial9 only.
impl TraceField for ApplicationProtocol
dial9 only.fn field_type() -> FieldType
§fn encode<W>(&self, encoder: &mut EventEncoder<'_, W>) -> Result<(), Error>where
W: Write,
fn encode<W>(&self, encoder: &mut EventEncoder<'_, W>) -> Result<(), Error>where
W: Write,
§fn is_optional() -> bool
fn is_optional() -> bool
§impl TryFrom<&ApplicationProtocol> for Version
impl TryFrom<&ApplicationProtocol> for Version
§impl TryFrom<ApplicationProtocol> for Version
impl TryFrom<ApplicationProtocol> for Version
Auto Trait Implementations§
impl Freeze for ApplicationProtocol
impl RefUnwindSafe for ApplicationProtocol
impl Send for ApplicationProtocol
impl Sync for ApplicationProtocol
impl Unpin for ApplicationProtocol
impl UnsafeUnpin for ApplicationProtocol
impl UnwindSafe for ApplicationProtocol
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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<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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.