Struct MetadataKey
pub struct MetadataKey<VE>where
VE: ValueEncoding,{ /* private fields */ }Expand description
Represents a custom metadata field name.
MetadataKey is used as the MetadataMap key.
Implementations§
§impl<VE> MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> MetadataKey<VE>where
VE: ValueEncoding,
pub fn from_bytes(src: &[u8]) -> Result<MetadataKey<VE>, InvalidMetadataKey>
pub fn from_bytes(src: &[u8]) -> Result<MetadataKey<VE>, InvalidMetadataKey>
Converts a slice of bytes to a MetadataKey.
This function normalizes the input.
pub fn from_static(src: &'static str) -> MetadataKey<VE>
pub fn from_static(src: &'static str) -> MetadataKey<VE>
Converts a static string to a MetadataKey.
This function panics when the static string is a invalid metadata key.
This function requires the static string to only contain lowercase characters, numerals and symbols, as per the HTTP/2.0 specification and header names internal representation within this library.
Trait Implementations§
§impl<VE> AsRef<[u8]> for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> AsRef<[u8]> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> AsRef<str> for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> AsRef<str> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> Borrow<str> for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> Borrow<str> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> Clone for MetadataKey<VE>where
VE: Clone + ValueEncoding,
impl<VE> Clone for MetadataKey<VE>where
VE: Clone + ValueEncoding,
§fn clone(&self) -> MetadataKey<VE>
fn clone(&self) -> MetadataKey<VE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<VE> Debug for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> Debug for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> Display for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> Display for MetadataKey<VE>where
VE: ValueEncoding,
§impl<'a, VE> From<&'a MetadataKey<VE>> for MetadataKey<VE>where
VE: ValueEncoding,
impl<'a, VE> From<&'a MetadataKey<VE>> for MetadataKey<VE>where
VE: ValueEncoding,
§fn from(src: &'a MetadataKey<VE>) -> MetadataKey<VE>
fn from(src: &'a MetadataKey<VE>) -> MetadataKey<VE>
Converts to this type from the input type.
§impl<KeyVE> From<MetadataKey<KeyVE>> for MetadataValue<Ascii>where
KeyVE: ValueEncoding,
impl<KeyVE> From<MetadataKey<KeyVE>> for MetadataValue<Ascii>where
KeyVE: ValueEncoding,
§fn from(h: MetadataKey<KeyVE>) -> MetadataValue<Ascii>
fn from(h: MetadataKey<KeyVE>) -> MetadataValue<Ascii>
Converts to this type from the input type.
§impl<VE> From<MetadataKey<VE>> for Byteswhere
VE: ValueEncoding,
impl<VE> From<MetadataKey<VE>> for Byteswhere
VE: ValueEncoding,
§fn from(name: MetadataKey<VE>) -> Bytes
fn from(name: MetadataKey<VE>) -> Bytes
Converts to this type from the input type.
§impl<VE> FromStr for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> FromStr for MetadataKey<VE>where
VE: ValueEncoding,
§type Err = InvalidMetadataKey
type Err = InvalidMetadataKey
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<MetadataKey<VE>, InvalidMetadataKey>
fn from_str(s: &str) -> Result<MetadataKey<VE>, InvalidMetadataKey>
Parses a string
s to return a value of this type. Read more§impl<VE> Hash for MetadataKey<VE>where
VE: Hash + ValueEncoding,
impl<VE> Hash for MetadataKey<VE>where
VE: Hash + ValueEncoding,
§impl<'a, VE> PartialEq<&'a MetadataKey<VE>> for MetadataKey<VE>where
VE: ValueEncoding,
impl<'a, VE> PartialEq<&'a MetadataKey<VE>> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<'a, VE> PartialEq<&'a str> for MetadataKey<VE>where
VE: ValueEncoding,
impl<'a, VE> PartialEq<&'a str> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> PartialEq<MetadataKey<VE>> for &MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> PartialEq<MetadataKey<VE>> for &MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> PartialEq<MetadataKey<VE>> for &strwhere
VE: ValueEncoding,
impl<VE> PartialEq<MetadataKey<VE>> for &strwhere
VE: ValueEncoding,
§impl<VE> PartialEq<MetadataKey<VE>> for strwhere
VE: ValueEncoding,
impl<VE> PartialEq<MetadataKey<VE>> for strwhere
VE: ValueEncoding,
§impl<VE> PartialEq<str> for MetadataKey<VE>where
VE: ValueEncoding,
impl<VE> PartialEq<str> for MetadataKey<VE>where
VE: ValueEncoding,
§impl<VE> PartialEq for MetadataKey<VE>where
VE: PartialEq + ValueEncoding,
impl<VE> PartialEq for MetadataKey<VE>where
VE: PartialEq + ValueEncoding,
impl<VE> Eq for MetadataKey<VE>where
VE: Eq + ValueEncoding,
impl<VE> StructuralPartialEq for MetadataKey<VE>where
VE: ValueEncoding,
Auto Trait Implementations§
impl<VE> !Freeze for MetadataKey<VE>
impl<VE> RefUnwindSafe for MetadataKey<VE>where
VE: RefUnwindSafe,
impl<VE> Send for MetadataKey<VE>where
VE: Send,
impl<VE> Sync for MetadataKey<VE>where
VE: Sync,
impl<VE> Unpin for MetadataKey<VE>where
VE: Unpin,
impl<VE> UnwindSafe for MetadataKey<VE>where
VE: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>
Create a new
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>
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)§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.