pub struct FrameWriter<'o> { /* private fields */ }Expand description
A sink that writes one value node onto the end of a buffer. Unknown
container lengths are patched in at end.
Implementations§
Source§impl<'o> FrameWriter<'o>
impl<'o> FrameWriter<'o>
Trait Implementations§
Source§impl<'o> Sink for FrameWriter<'o>
impl<'o> Sink for FrameWriter<'o>
Source§fn typed_null(self, _: FixedType) -> Result<(), FrameWriteError>
fn typed_null(self, _: FixedType) -> Result<(), FrameWriteError>
Written as the plain null. A frame is plaintext, never sealed, so
padding hides nothing in it: what a frame writer produces goes to a
host (the frame decrypt_to_frame
returns) or into the clear (a passthrough subtree), where the plain
null is what every reader already knows. A frame a host sends may
still carry a typed null, which Frame reads, so the host’s
absent values are padded when sealed.
Source§type Error = FrameWriteError
type Error = FrameWriteError
The sink’s error, which can also carry a
SourceError.Source§fn seq(self, len: Option<usize>) -> Result<FrameSeq<'o>, FrameWriteError>
fn seq(self, len: Option<usize>) -> Result<FrameSeq<'o>, FrameWriteError>
Start a sequence.
len is a hint; a source that does not know its
length passes None.Source§fn map(self, len: Option<usize>) -> Result<FrameMap<'o>, FrameWriteError>
fn map(self, len: Option<usize>) -> Result<FrameMap<'o>, FrameWriteError>
Start a map with string keys.
len is a hint.Source§fn passthrough<P: Encrypt + Clone>(
self,
value: P,
) -> Result<(), FrameWriteError>
fn passthrough<P: Encrypt + Clone>( self, value: P, ) -> Result<(), FrameWriteError>
A subtree that travels in the clear. It is walked like anything
else; the sink decides what “in the clear” means for it. Read more
Auto Trait Implementations§
impl<'o> !UnwindSafe for FrameWriter<'o>
impl<'o> Freeze for FrameWriter<'o>
impl<'o> RefUnwindSafe for FrameWriter<'o>
impl<'o> Send for FrameWriter<'o>
impl<'o> Sync for FrameWriter<'o>
impl<'o> Unpin for FrameWriter<'o>
impl<'o> UnsafeUnpin for FrameWriter<'o>
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