pub struct ActiveQuery {
pub pid: i32,
pub usename: Option<String>,
pub application_name: Option<String>,
pub client_addr: Option<String>,
pub state: Option<String>,
pub wait_event_type: Option<String>,
pub wait_event: Option<String>,
pub query_start: Option<DateTime<Utc>>,
pub query: String,
}Expand description
pg_stat_activity 中的一条会话快照。
Fields§
§pid: i32后端进程 ID。
usename: Option<String>登录角色名。
application_name: Option<String>应用名(连接串中的 application_name)。
client_addr: Option<String>客户端地址(host(client_addr) 文本)。
state: Option<String>会话状态(active / idle / idle in transaction 等)。
wait_event_type: Option<String>等待事件类别。
wait_event: Option<String>等待事件名。
query_start: Option<DateTime<Utc>>当前语句开始时间。
query: String最近一次执行的语句文本。
Trait Implementations§
Source§impl Clone for ActiveQuery
impl Clone for ActiveQuery
Source§impl Debug for ActiveQuery
impl Debug for ActiveQuery
Source§impl<'a, R: Row> FromRow<'a, R> for ActiveQuery
impl<'a, R: Row> FromRow<'a, R> for ActiveQuery
Auto Trait Implementations§
impl Forget for ActiveQuery
impl Freeze for ActiveQuery
impl Move for ActiveQuery
impl RefUnwindSafe for ActiveQuery
impl Send for ActiveQuery
impl Sync for ActiveQuery
impl Unpin for ActiveQuery
impl UnsafeUnpin for ActiveQuery
impl UnwindSafe for ActiveQuery
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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