Skip to main content

ReadonlyContext

Trait ReadonlyContext 

Source
pub trait ReadonlyContext {
    // Required methods
    fn invocation_id(&self) -> &str;
    fn session_id(&self) -> &str;
    fn user_id(&self) -> &str;
    fn app_name(&self) -> &str;
}
Expand description

The minimum context available to any participant in the system.

Provides read-only identity information: who is making the request, which session it belongs to, and which application is running.

Required Methods§

Source

fn invocation_id(&self) -> &str

Returns the unique invocation identifier for this run.

Source

fn session_id(&self) -> &str

Returns the session identifier.

Source

fn user_id(&self) -> &str

Returns the authenticated user identifier.

Source

fn app_name(&self) -> &str

Returns the application name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§