Struct EventDataWriter

#[must_use]
pub struct EventDataWriter { /* private fields */ }

Expose Event as a std::fmt::Write such that any form of data can be written as data safely.

This also ensures that newline characters \r and \n correctly trigger a split with a new data: prefix.

Panics

Panics if any data has already been written prior to the first write of this EventDataWriter instance.

Implementations

impl EventDataWriter

fn into_event(self) -> Event

Consume the EventDataWriter and return the Event once again.

In case any data was written by this instance it will also write the trailing \n character.

Trait Implementations

impl Debug for EventDataWriter

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Write for EventDataWriter

fn write_str(&mut self, s: &str) -> Result

Auto Trait Implementations

impl !Freeze for EventDataWriter

impl RefUnwindSafe for EventDataWriter

impl Send for EventDataWriter

impl Sync for EventDataWriter

impl Unpin for EventDataWriter

impl UnsafeUnpin for EventDataWriter

impl UnwindSafe for EventDataWriter

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for EventDataWriter where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for EventDataWriter where ST: ?Sized, DT: ?Sized,

impl<T> Any for EventDataWriter where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for EventDataWriter where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for EventDataWriter where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for EventDataWriter

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for EventDataWriter

impl<T> Read<Exclusive, BecauseExclusive> for EventDataWriter where T: ?Sized,

impl<T> Same for EventDataWriter

type Output = T;

impl<T> WithSubscriber for EventDataWriter

impl<T, U> Into<U> for EventDataWriter where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for EventDataWriter where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for EventDataWriter where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for EventDataWriter where V: MultiLane<T>,

fn vzip(self) -> V