Struct EventEncoder
pub struct EventEncoder<'a, W = Vec<u8>>where
W: Write,{ /* private fields */ }Available on crate feature
dial9 only.Expand description
Short-lived encoder for writing the fields of a single event.
Created by crate::encoder::Encoder::write and passed to
crate::TraceEvent::encode_fields, analogous to fmt::Formatter.
Implementations§
§impl<'a, W> EventEncoder<'a, W>where
W: Write,
impl<'a, W> EventEncoder<'a, W>where
W: Write,
pub fn write_u8(&mut self, v: u8) -> Result<(), Error>
pub fn write_u16(&mut self, v: u16) -> Result<(), Error>
pub fn write_u32(&mut self, v: u32) -> Result<(), Error>
pub fn write_u64(&mut self, v: u64) -> Result<(), Error>
pub fn write_i64(&mut self, v: i64) -> Result<(), Error>
pub fn write_f64(&mut self, v: f64) -> Result<(), Error>
pub fn write_bool(&mut self, v: bool) -> Result<(), Error>
pub fn write_string(&mut self, v: &str) -> Result<(), Error>
pub fn write_bytes(&mut self, v: &[u8]) -> Result<(), Error>
pub fn write_interned(&mut self, v: InternedString) -> Result<(), Error>
pub fn write_interned_stack_frames( &mut self, v: InternedStackFrames, ) -> Result<(), Error>
pub fn write_stack_frames(&mut self, v: &StackFrames) -> Result<(), Error>
pub fn write_string_map(&mut self, v: &[(String, String)]) -> Result<(), Error>
pub fn write_field_value(
&mut self,
value: &FieldValue,
field_type: FieldType,
) -> Result<(), Error>
pub fn write_field_value( &mut self, value: &FieldValue, field_type: FieldType, ) -> Result<(), Error>
Write a FieldValue with its associated FieldType.
For optional field types, writes the presence prefix byte (0x00 for
None, 0x01 + inner encoding for present values).
Auto Trait Implementations§
impl<'a, W = Vec<u8>> !UnwindSafe for EventEncoder<'a, W>
impl<'a, W> Freeze for EventEncoder<'a, W>
impl<'a, W> RefUnwindSafe for EventEncoder<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for EventEncoder<'a, W>where
W: Send,
impl<'a, W> Sync for EventEncoder<'a, W>where
W: Sync,
impl<'a, W> Unpin for EventEncoder<'a, W>
impl<'a, W> UnsafeUnpin for EventEncoder<'a, W>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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