#[non_exhaustive]
pub enum Context {
Device(Box<DeviceContext>),
Os(Box<OsContext>),
Runtime(Box<RuntimeContext>),
App(Box<AppContext>),
Browser(Box<BrowserContext>),
Trace(Box<TraceContext>),
Gpu(Box<GpuContext>),
Other(Map<String, Value>),
}
Expand description
Typed contextual data.
Types like OsContext
can be directly converted with .into()
to Context
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Device(Box<DeviceContext>)
Device data.
Os(Box<OsContext>)
Operating system data.
Runtime(Box<RuntimeContext>)
Runtime data.
App(Box<AppContext>)
Application data.
Browser(Box<BrowserContext>)
Web browser data.
Trace(Box<TraceContext>)
Tracing data.
Gpu(Box<GpuContext>)
GPU data
Other(Map<String, Value>)
Generic other context data.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<AppContext> for Context
impl From<AppContext> for Context
sourcefn from(data: AppContext) -> Self
fn from(data: AppContext) -> Self
Converts to this type from the input type.
sourceimpl From<BrowserContext> for Context
impl From<BrowserContext> for Context
sourcefn from(data: BrowserContext) -> Self
fn from(data: BrowserContext) -> Self
Converts to this type from the input type.
sourceimpl From<DeviceContext> for Context
impl From<DeviceContext> for Context
sourcefn from(data: DeviceContext) -> Self
fn from(data: DeviceContext) -> Self
Converts to this type from the input type.
sourceimpl From<GpuContext> for Context
impl From<GpuContext> for Context
sourcefn from(data: GpuContext) -> Self
fn from(data: GpuContext) -> Self
Converts to this type from the input type.
sourceimpl From<RuntimeContext> for Context
impl From<RuntimeContext> for Context
sourcefn from(data: RuntimeContext) -> Self
fn from(data: RuntimeContext) -> Self
Converts to this type from the input type.
sourceimpl From<TraceContext> for Context
impl From<TraceContext> for Context
sourcefn from(data: TraceContext) -> Self
fn from(data: TraceContext) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Context
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more