pub struct ConnectionSlot { /* private fields */ }Expand description
进程生命周期连接统计槽;未知名称共用固定回退槽。
Implementations§
Source§impl ConnectionSlot
impl ConnectionSlot
Sourcepub fn reject(&self, reason: ConnectionRejection)
pub fn reject(&self, reason: ConnectionRejection)
业务作用:记录连接发放之前的安全门禁拒绝。
参数说明:
reason:是由连接权威判定的固定分类。
返回:无;不产生数据库 operation 或连接等待样本。
Sourcepub fn acquire(&'static self, purpose: ConnectionPurpose) -> WaitGuard
pub fn acquire(&'static self, purpose: ConnectionPurpose) -> WaitGuard
业务作用:开始观察普通 Pool 获取,保证取消时回收 in-flight。
参数说明:
purpose:是调用方明确声明的连接用途。
返回:持有进程静态统计槽的等待守卫。
Sourcepub fn transaction_slot(&'static self) -> WaitGuard
pub fn transaction_slot(&'static self) -> WaitGuard
业务作用:开始观察 ambient transaction 的连接槽等待。
参数说明:无。
返回:与 Pool acquire 独立计时的取消安全守卫。
Auto Trait Implementations§
impl !Freeze for ConnectionSlot
impl Forget for ConnectionSlot
impl Move for ConnectionSlot
impl RefUnwindSafe for ConnectionSlot
impl Send for ConnectionSlot
impl Sync for ConnectionSlot
impl Unpin for ConnectionSlot
impl UnsafeUnpin for ConnectionSlot
impl UnwindSafe for ConnectionSlot
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