pub struct Sqllog<'a> {
pub ts: Cow<'a, str>,
pub meta_raw: Cow<'a, str>,
pub content_raw: Cow<'a, [u8]>,
}Expand description
SQL 日志记录
表示一条完整的 SQL 日志记录,包含时间戳、元数据、SQL 语句体和可选的性能指标。
Fields§
§ts: Cow<'a, str>时间戳,格式为 “YYYY-MM-DD HH:MM:SS.mmm”
meta_raw: Cow<'a, str>原始元数据字节(延迟解析)
content_raw: Cow<'a, [u8]>原始内容(包含 Body 和 Indicators),延迟分割和解析
Implementations§
Source§impl<'a> Sqllog<'a>
impl<'a> Sqllog<'a>
Sourcepub fn indicators_raw(&self) -> Option<Cow<'a, str>>
pub fn indicators_raw(&self) -> Option<Cow<'a, str>>
获取原始性能指标字符串(延迟分割)
Sourcepub fn parse_indicators(&self) -> Option<IndicatorsParts>
pub fn parse_indicators(&self) -> Option<IndicatorsParts>
解析性能指标
Sourcepub fn parse_meta(&self) -> MetaParts<'a>
pub fn parse_meta(&self) -> MetaParts<'a>
解析元数据
Trait Implementations§
impl<'a> StructuralPartialEq for Sqllog<'a>
Auto Trait Implementations§
impl<'a> Freeze for Sqllog<'a>
impl<'a> RefUnwindSafe for Sqllog<'a>
impl<'a> Send for Sqllog<'a>
impl<'a> Sync for Sqllog<'a>
impl<'a> Unpin for Sqllog<'a>
impl<'a> UnwindSafe for Sqllog<'a>
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