pub struct EntryBuilder { /* private fields */ }Expand description
Builds an entry while the body is still arriving.
Write EntryBuilder::prefix, then each body chunk (also passed to
EntryBuilder::update), then EntryBuilder::trailer.
Implementations§
Source§impl EntryBuilder
impl EntryBuilder
Sourcepub fn trailer(self, meta: CacheEntryMeta) -> Result<Vec<u8>, EntryError>
pub fn trailer(self, meta: CacheEntryMeta) -> Result<Vec<u8>, EntryError>
The bytes that end the entry: the metadata (with length and digest filled in) and its length.
§Errors
Returns an error when the metadata cannot be serialised or is too large.
Trait Implementations§
Auto Trait Implementations§
impl Forget for EntryBuilder
impl Freeze for EntryBuilder
impl RefUnwindSafe for EntryBuilder
impl Send for EntryBuilder
impl Sync for EntryBuilder
impl Unpin for EntryBuilder
impl UnsafeUnpin for EntryBuilder
impl UnwindSafe for EntryBuilder
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