Struct glean::private::PingType[][src]

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

A ping is a bundle of related metrics, gathered in a payload to be transmitted.

The ping payload will be encoded in JSON format and contains shared information data.

Implementations

Creates a new ping type.

Arguments
  • name - The name of the ping.
  • include_client_id - Whether to include the client ID in the assembled ping when.
  • send_if_empty - Whether the ping should be sent empty or not.
  • reason_codes - The valid reason codes for this ping.

Test-only API

Attach a callback to be called right before a new ping is submitted. The provided function is called exactly once before submitting a ping.

Note: The callback will be called on any call to submit. A ping might not be sent afterwards, e.g. if the ping is otherwise empty (and send_if_empty is false).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Submits the ping for eventual uploading 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.