Skip to main content

append

Function append 

pub(crate) fn append<E, F>(buf: &mut Vec<u8>, encode: F) -> Result<(), E>
where F: FnOnce(&mut Writer<&mut Vec<u8>>) -> Result<(), E>,
Available on crate feature alloc only.
Expand description

Appends what encode writes to buf. On error, buf keeps its previous contents.

ยงErrors

Returns the error of encode.