pub struct HeadTailBuffer { /* private fields */ }Expand description
Per-stream output buffer. Keeps head in memory, spills the rest to a temp file when overflow triggers. Matches the TS HeadTailBuffer simplification (head-only inline; full file recoverable via Read).
Implementations§
Source§impl HeadTailBuffer
impl HeadTailBuffer
pub fn new( max_inline: usize, max_file: usize, kind: &'static str, spill_dir: PathBuf, ) -> Self
pub fn with_defaults(kind: &'static str, spill_dir: PathBuf) -> Self
pub fn write(&mut self, chunk: &[u8])
pub fn render(&self) -> HeadTailRender
pub fn bytes_total(&self) -> usize
Auto Trait Implementations§
impl Freeze for HeadTailBuffer
impl RefUnwindSafe for HeadTailBuffer
impl Send for HeadTailBuffer
impl Sync for HeadTailBuffer
impl Unpin for HeadTailBuffer
impl UnsafeUnpin for HeadTailBuffer
impl UnwindSafe for HeadTailBuffer
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