pub struct Context { /* private fields */ }
Expand description
上下文
Implementations§
Source§impl Context
impl Context
Sourcepub async fn set_user_id(&self, user_id: impl Into<String>)
pub async fn set_user_id(&self, user_id: impl Into<String>)
设置用户ID
Sourcepub async fn set_tenant_id(&self, tenant_id: impl Into<String>)
pub async fn set_tenant_id(&self, tenant_id: impl Into<String>)
设置租户ID
Sourcepub async fn set_request_id(&self, request_id: impl Into<String>)
pub async fn set_request_id(&self, request_id: impl Into<String>)
设置请求ID
Sourcepub async fn request_id(&self) -> Option<String>
pub async fn request_id(&self) -> Option<String>
获取请求ID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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