pub struct ChargedLineReader { /* private fields */ }Expand description
Line iterator over a file. close() and Drop both free the fd and refund bytes.
Implementations§
Source§impl ChargedLineReader
impl ChargedLineReader
pub fn new( reader: BufReader<File>, limits: &TenantLimits, held: Option<OpenFileGuard>, ) -> Result<Self, MemoryCapExceeded>
Sourcepub fn read_next(
&mut self,
limits: &TenantLimits,
max_bytes: u64,
) -> Result<Option<ChargedLine>>
pub fn read_next( &mut self, limits: &TenantLimits, max_bytes: u64, ) -> Result<Option<ChargedLine>>
Read one bounded line, accounting for the retained buffer and returned text before allocation. The byte limit includes BOM and line delimiters.
pub fn close(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChargedLineReader
impl RefUnwindSafe for ChargedLineReader
impl Send for ChargedLineReader
impl Sync for ChargedLineReader
impl Unpin for ChargedLineReader
impl UnsafeUnpin for ChargedLineReader
impl UnwindSafe for ChargedLineReader
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