Struct glean_core::metrics::JweMetric
source · [−]pub struct JweMetric { /* private fields */ }
Expand description
A JWE metric.
This metric will be work as a “transport” for JWE encrypted data.
The actual encrypti on is done somewhere else, Glean must only make sure the data is valid JWE.
Implementations
sourceimpl JweMetric
impl JweMetric
sourcepub fn new(meta: CommonMetricData) -> Self
pub fn new(meta: CommonMetricData) -> Self
Creates a new JWE metric.
sourcepub fn set_with_compact_representation<S: Into<String>>(
&self,
glean: &Glean,
value: S
)
pub fn set_with_compact_representation<S: Into<String>>(
&self,
glean: &Glean,
value: S
)
Sets to the specified JWE value.
Arguments
glean
- the Glean instance this metric belongs to.value
- thecompact representation
of a JWE value.
sourcepub fn set<S: Into<String>>(
&self,
glean: &Glean,
header: S,
key: S,
init_vector: S,
cipher_text: S,
auth_tag: S
)
pub fn set<S: Into<String>>(
&self,
glean: &Glean,
header: S,
key: S,
init_vector: S,
cipher_text: S,
auth_tag: S
)
Builds a JWE value from its elements and set to it.
Arguments
glean
- the Glean instance this metric belongs to.header
- the JWE Protected Header element.key
- the JWE Encrypted Key element.init_vector
- the JWE Initialization Vector element.cipher_text
- the JWE Ciphertext element.auth_tag
- the JWE Authentication Tag element.
Trait Implementations
sourceimpl MetricType for JweMetric
impl MetricType for JweMetric
sourcefn meta(&self) -> &CommonMetricData
fn meta(&self) -> &CommonMetricData
Access the stored metadata
sourcefn meta_mut(&mut self) -> &mut CommonMetricData
fn meta_mut(&mut self) -> &mut CommonMetricData
Access the stored metadata mutable
sourcefn should_record(&self, glean: &Glean) -> bool
fn should_record(&self, glean: &Glean) -> bool
Whether this metric should currently be recorded Read more
Auto Trait Implementations
impl RefUnwindSafe for JweMetric
impl Send for JweMetric
impl Sync for JweMetric
impl Unpin for JweMetric
impl UnwindSafe for JweMetric
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