pub struct LogParserBuilder<F: LogFormat> { /* private fields */ }Expand description
通用日志文件解析器构建器。
Implementations§
Source§impl<F: LogFormat> LogParserBuilder<F>
impl<F: LogFormat> LogParserBuilder<F>
pub fn new<P: AsRef<Path>>(path: P) -> Self
Sourcepub fn encoding_hint(self, hint: FileEncodingHint) -> Self
pub fn encoding_hint(self, hint: FileEncodingHint) -> Self
设置输入文件编码;默认使用 FileEncodingHint::Auto。
Sourcepub fn build(self) -> Result<LogParser<F>, ParseError>
pub fn build(self) -> Result<LogParser<F>, ParseError>
打开并验证输入文件,然后构建一个可重复调用 iter() 的解析器。
Auto Trait Implementations§
impl<F> Freeze for LogParserBuilder<F>where
PhantomData<F>: Freeze,
impl<F> RefUnwindSafe for LogParserBuilder<F>where
PhantomData<F>: RefUnwindSafe,
impl<F> Send for LogParserBuilder<F>where
PhantomData<F>: Send,
impl<F> Sync for LogParserBuilder<F>where
PhantomData<F>: Sync,
impl<F> Unpin for LogParserBuilder<F>where
PhantomData<F>: Unpin,
impl<F> UnsafeUnpin for LogParserBuilder<F>where
PhantomData<F>: UnsafeUnpin,
impl<F> UnwindSafe for LogParserBuilder<F>where
PhantomData<F>: UnwindSafe,
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