pub(crate) struct Entry(Vec<u8>);Expand description
A journal entry, encoded for the native protocol.
Tuple Fields§
§0: Vec<u8>Implementations§
Source§impl Entry
impl Entry
Sourcepub(crate) fn new(priority: Priority, message: impl AsRef<[u8]>) -> Self
pub(crate) fn new(priority: Priority, message: impl AsRef<[u8]>) -> Self
An entry with the PRIORITY and MESSAGE fields.
Sourcepub(crate) fn reset(
&mut self,
priority: Priority,
message: impl AsRef<[u8]>,
) -> &mut Self
pub(crate) fn reset( &mut self, priority: Priority, message: impl AsRef<[u8]>, ) -> &mut Self
Start over with the PRIORITY and MESSAGE fields, keeping the
allocation.
Sourcepub(crate) fn field(&mut self, key: &str, value: impl AsRef<[u8]>) -> &mut Self
pub(crate) fn field(&mut self, key: &str, value: impl AsRef<[u8]>) -> &mut Self
Append a field. The key must be a valid journal field name: upper case letters, digits and underscores, not starting with a digit or an underscore.
Sourcefn valid_key(key: &str) -> bool
fn valid_key(key: &str) -> bool
Whether the key is a valid journal field name, see Entry::field,
at most 64 characters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
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> ⓘ
§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 tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].