Enum FieldLine
pub enum FieldLine {
Indexed {
is_static: bool,
index: u64,
},
IndexedPostBase {
index: u64,
},
LiteralWithNameRef {
never_index: bool,
is_static: bool,
name_index: u64,
value: Bytes,
value_huffman: bool,
},
LiteralWithPostBaseNameRef {
never_index: bool,
name_index: u64,
value: Bytes,
value_huffman: bool,
},
LiteralWithLiteralName {
never_index: bool,
name: Bytes,
name_huffman: bool,
value: Bytes,
value_huffman: bool,
},
}http and std only.Expand description
A single field-line representation within an encoded field section (RFC 9204 §4.5.2–§4.5.6).
Indices are unresolved: dynamic references are relative to the section’s Base (or post-Base), as
on the wire. huffman flags record whether a string was Huffman-encoded so the representation
can be re-emitted faithfully; they do not affect equality of the decoded value.
Variants§
Indexed
Indexed field line (RFC 9204 §4.5.2): a full entry by index.
Fields
IndexedPostBase
Indexed field line with post-Base index (RFC 9204 §4.5.3): a dynamic entry at or after Base.
LiteralWithNameRef
Literal field line with a name reference (RFC 9204 §4.5.4).
Fields
LiteralWithPostBaseNameRef
Literal field line with a post-Base name reference (RFC 9204 §4.5.5).
Fields
LiteralWithLiteralName
Literal field line with a literal name (RFC 9204 §4.5.6).
Implementations§
§impl FieldLine
impl FieldLine
pub fn decode(
src: &mut &[u8],
max_string_len: usize,
) -> Result<FieldLine, PrefixError>
pub fn decode( src: &mut &[u8], max_string_len: usize, ) -> Result<FieldLine, PrefixError>
Decode one field-line representation, bounding each decoded string by max_string_len.
pub fn decode_bytes(
src: &mut Bytes,
max_string_len: usize,
) -> Result<FieldLine, PrefixError>
pub fn decode_bytes( src: &mut Bytes, max_string_len: usize, ) -> Result<FieldLine, PrefixError>
Decode from owned bytes, slicing plain literals without copying their payloads. Leaves the cursor unchanged on error.
pub fn encoded_len(
src: &[u8],
max_string_len: usize,
) -> Result<usize, PrefixError>
pub fn encoded_len( src: &[u8], max_string_len: usize, ) -> Result<usize, PrefixError>
Probe the complete field-line length without decoding or allocating strings.
Incomplete bodies return UnexpectedEnd; impossible string lengths fail early.
Trait Implementations§
impl Eq for FieldLine
impl StructuralPartialEq for FieldLine
Auto Trait Implementations§
impl !Freeze for FieldLine
impl RefUnwindSafe for FieldLine
impl Send for FieldLine
impl Sync for FieldLine
impl Unpin for FieldLine
impl UnsafeUnpin for FieldLine
impl UnwindSafe for FieldLine
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<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