pub struct EventDataWriter { /* private fields */ }Expand description
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§
Source§impl EventDataWriter
impl EventDataWriter
Sourcepub fn into_event(self) -> Event
pub 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§
Source§impl Debug for EventDataWriter
impl Debug for EventDataWriter
Auto Trait Implementations§
impl !Freeze for EventDataWriter
impl RefUnwindSafe for EventDataWriter
impl Send for EventDataWriter
impl Sync for EventDataWriter
impl Unpin for EventDataWriter
impl UnwindSafe for EventDataWriter
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