pub struct FatalSerializer { /* private fields */ }Expand description
The streaming fatal-envelope serializer and its fixed scratch space. A
binary reserves one before evaluator allocation accounting begins, so a
fatal projection is always emittable: emission streams JCS(envelope)
and the trailing newline through the reserved staging buffer without
materializing the wire.
Implementations§
Source§impl FatalSerializer
impl FatalSerializer
Sourcepub fn emit(&mut self, envelope: &Value, out: &mut dyn Write) -> Result<u64>
pub fn emit(&mut self, envelope: &Value, out: &mut dyn Write) -> Result<u64>
Streams the envelope’s wire (JCS(envelope) || LF) into the writer
through the reserved scratch and returns the byte count.
§Errors
The first writer error; the wire is incomplete in that case and the caller treats the emission as failed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FatalSerializer
impl RefUnwindSafe for FatalSerializer
impl Send for FatalSerializer
impl Sync for FatalSerializer
impl Unpin for FatalSerializer
impl UnsafeUnpin for FatalSerializer
impl UnwindSafe for FatalSerializer
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