pub struct NdjsonTailer { /* private fields */ }Implementations§
Source§impl NdjsonTailer
impl NdjsonTailer
pub fn new(path: &Path) -> Self
Sourcepub fn contained(path: &Path, base: &Path) -> Self
pub fn contained(path: &Path, base: &Path) -> Self
A tailer that refuses to read once path resolves outside base.
pub fn malformed(&self) -> bool
pub fn has_partial_line(&self) -> bool
Sourcepub fn poll<T: DeserializeOwned>(&mut self) -> Result<Vec<T>>
pub fn poll<T: DeserializeOwned>(&mut self) -> Result<Vec<T>>
Read complete new lines appended since the last poll and parse each
as T. Unparsable lines are omitted from values but retained as an
integrity flag.
Auto Trait Implementations§
impl Freeze for NdjsonTailer
impl RefUnwindSafe for NdjsonTailer
impl Send for NdjsonTailer
impl Sync for NdjsonTailer
impl Unpin for NdjsonTailer
impl UnsafeUnpin for NdjsonTailer
impl UnwindSafe for NdjsonTailer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more