Enum Context
#[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(BTreeMap<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(BTreeMap<String, Value>)
Generic other context data.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Context, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Context, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<AppContext> for Context
impl From<AppContext> for Context
§fn from(data: AppContext) -> Context
fn from(data: AppContext) -> Context
Converts to this type from the input type.
§impl From<BrowserContext> for Context
impl From<BrowserContext> for Context
§fn from(data: BrowserContext) -> Context
fn from(data: BrowserContext) -> Context
Converts to this type from the input type.
§impl From<DeviceContext> for Context
impl From<DeviceContext> for Context
§fn from(data: DeviceContext) -> Context
fn from(data: DeviceContext) -> Context
Converts to this type from the input type.
§impl From<GpuContext> for Context
impl From<GpuContext> for Context
§fn from(data: GpuContext) -> Context
fn from(data: GpuContext) -> Context
Converts to this type from the input type.
§impl From<RuntimeContext> for Context
impl From<RuntimeContext> for Context
§fn from(data: RuntimeContext) -> Context
fn from(data: RuntimeContext) -> Context
Converts to this type from the input type.
§impl From<TraceContext> for Context
impl From<TraceContext> for Context
§fn from(data: TraceContext) -> Context
fn from(data: TraceContext) -> Context
Converts to this type from the input type.
§impl Serialize for Context
impl Serialize for Context
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Context
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)