pub struct CurrentContext {
pub turn_id: Option<Uuid>,
pub provider: Option<String>,
pub provider_host: Option<String>,
pub model: Option<String>,
pub repo_origin: Option<RepoOrigin>,
pub mode: Option<SessionMode>,
pub session_id: Option<Uuid>,
}Expand description
Per-event context auto-filled by track. Set with CurrentContext::scope(...).
Note: account_id lives on Telemetry itself (see set_account_id) rather
than here, because login state outlives any single scope and must apply to
all events emitted after sign-in, including login_success itself.
Fields§
§turn_id: Option<Uuid>§provider: Option<String>§provider_host: Option<String>§model: Option<String>§repo_origin: Option<RepoOrigin>§mode: Option<SessionMode>§session_id: Option<Uuid>Implementations§
Source§impl CurrentContext
impl CurrentContext
pub async fn scope<F, Fut, R>(ctx: CurrentContext, fut: F) -> R
Sourcepub fn current() -> CurrentContext
pub fn current() -> CurrentContext
Access the current context, or default if unset.
Trait Implementations§
Source§impl Clone for CurrentContext
impl Clone for CurrentContext
Source§fn clone(&self) -> CurrentContext
fn clone(&self) -> CurrentContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CurrentContext
impl Debug for CurrentContext
Source§impl Default for CurrentContext
impl Default for CurrentContext
Source§fn default() -> CurrentContext
fn default() -> CurrentContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CurrentContext
impl RefUnwindSafe for CurrentContext
impl Send for CurrentContext
impl Sync for CurrentContext
impl Unpin for CurrentContext
impl UnsafeUnpin for CurrentContext
impl UnwindSafe for CurrentContext
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