Struct relay_event_schema::protocol::NelContext
source · pub struct NelContext {
pub error_type: Annotated<String>,
pub server_ip: Annotated<IpAddr>,
pub elapsed_time: Annotated<u64>,
pub phase: Annotated<NetworkReportPhases>,
pub sampling_fraction: Annotated<f64>,
pub other: Object<Value>,
}
Expand description
Contains NEL report information.
Network Error Logging (NEL) is a browser feature that allows reporting of failed network requests from the client side. See the following resources for more information:
Fields§
§error_type: Annotated<String>
If request failed, the type of its network error. If request succeeded, “ok”.
server_ip: Annotated<IpAddr>
Server IP where the requests was sent to.
elapsed_time: Annotated<u64>
The number of milliseconds between the start of the resource fetch and when it was aborted by the user agent.
phase: Annotated<NetworkReportPhases>
If request failed, the phase of its network error. If request succeeded, “application”.
sampling_fraction: Annotated<f64>
The sampling rate.
other: Object<Value>
For forward compatibility.
Trait Implementations§
source§impl Clone for NelContext
impl Clone for NelContext
source§fn clone(&self) -> NelContext
fn clone(&self) -> NelContext
Returns a copy of the value. Read more
1.0.0 · 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 NelContext
impl Debug for NelContext
source§impl Default for NelContext
impl Default for NelContext
source§fn default() -> NelContext
fn default() -> NelContext
Returns the “default value” for a type. Read more
source§impl DefaultContext for NelContext
impl DefaultContext for NelContext
source§fn default_key() -> &'static str
fn default_key() -> &'static str
The default key at which this context resides in
Contexts
.source§fn from_context(context: Context) -> Option<Self>
fn from_context(context: Context) -> Option<Self>
Converts this context type from a generic context type. Read more
source§fn cast(context: &Context) -> Option<&Self>
fn cast(context: &Context) -> Option<&Self>
Casts a reference to this context type from a generic context type. Read more
source§fn cast_mut(context: &mut Context) -> Option<&mut Self>
fn cast_mut(context: &mut Context) -> Option<&mut Self>
Casts a mutable reference to this context type from a generic context type. Read more
source§fn into_context(self) -> Context
fn into_context(self) -> Context
Boxes this context type in the generic context wrapper. Read more
source§impl Empty for NelContext
impl Empty for NelContext
source§impl FromValue for NelContext
impl FromValue for NelContext
source§fn from_value(__value: Annotated<Value>) -> Annotated<Self>
fn from_value(__value: Annotated<Value>) -> Annotated<Self>
Creates a meta structure from an annotated boxed value.
source§impl IntoValue for NelContext
impl IntoValue for NelContext
source§fn into_value(self) -> Value
fn into_value(self) -> Value
Boxes the meta structure back into a value.
source§fn serialize_payload<S>(
&self,
__serializer: S,
__behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
fn serialize_payload<S>(
&self,
__serializer: S,
__behavior: SkipSerialization,
) -> Result<S::Ok, S::Error>where
Self: Sized,
S: Serializer,
Efficiently serializes the payload directly.
source§fn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
fn extract_child_meta(&self) -> MetaMapwhere
Self: Sized,
Extracts children meta map out of a value.
§fn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
Self: Sized,
fn extract_meta_tree(value: &Annotated<Self>) -> MetaTreewhere
Self: Sized,
Extracts the meta tree out of annotated value. Read more
source§impl PartialEq for NelContext
impl PartialEq for NelContext
source§impl ProcessValue for NelContext
impl ProcessValue for NelContext
source§fn value_type(&self) -> EnumSet<ValueType>
fn value_type(&self) -> EnumSet<ValueType>
Returns the type of the value.
source§fn process_value<P>(
&mut self,
__meta: &mut Meta,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
fn process_value<P>(
&mut self,
__meta: &mut Meta,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
Executes a processor on this value.
source§fn process_child_values<P>(
&mut self,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
fn process_child_values<P>(
&mut self,
__processor: &mut P,
__state: &ProcessingState<'_>,
) -> ProcessingResultwhere
P: Processor,
Recurses into children of this value.
impl StructuralPartialEq for NelContext
Auto Trait Implementations§
impl Freeze for NelContext
impl RefUnwindSafe for NelContext
impl Send for NelContext
impl Sync for NelContext
impl Unpin for NelContext
impl UnwindSafe for NelContext
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
)