pub struct Record {
pub lines: Vec<String>,
}Expand description
表示一条完整的日志记录(可能包含多行)
日志记录由一个起始行和零个或多个继续行组成。起始行包含时间戳和元数据, 继续行包含多行 SQL 语句的后续部分。
Fields§
§lines: Vec<String>记录的所有行(第一行是起始行,后续行是继续行)
Implementations§
Source§impl Record
impl Record
Sourcepub fn start_line(&self) -> &str
pub fn start_line(&self) -> &str
Sourcepub fn full_content(&self) -> String
pub fn full_content(&self) -> String
Sourcepub fn has_continuation_lines(&self) -> bool
pub fn has_continuation_lines(&self) -> bool
Sourcepub fn parse_to_sqllog(&self) -> Result<Sqllog, ParseError>
pub fn parse_to_sqllog(&self) -> Result<Sqllog, ParseError>
Trait Implementations§
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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