Struct glean_core::metrics::UuidMetric[][src]

pub struct UuidMetric { /* fields omitted */ }
Expand description

An UUID metric.

Stores UUID v4 (randomly generated) values.

Implementations

Creates a new UUID metric

Sets to the specified value.

Arguments
  • glean - The Glean instance this metric belongs to.
  • value - The Uuid to set the metric to.

Sets to the specified value, from a string.

This should only be used from FFI. When calling directly from Rust, it is better to use set.

Arguments
  • glean - The Glean instance this metric belongs to.
  • value - The Uuid to set the metric to.

Generates a new random [Uuid’] and sets the metric to it.

Arguments
  • glean - The Glean instance this metric belongs to.

Test-only API (exported for FFI purposes).

Gets the currently stored value as a string.

This doesn’t clear the stored value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Access the stored metadata

Access the stored metadata mutable

Whether this metric should currently be recorded Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.