Struct glean_core::ping::PingMaker[][src]

pub struct PingMaker;
Expand description

Collect a ping’s data, assemble it into its full payload and store it on disk.

Implementations

Creates a new PingMaker.

Collects a snapshot for the given ping from storage and attach required meta information.

Arguments

  • glean - the Glean instance to collect data from.
  • ping - the ping to collect for.
  • reason - an optional reason code to include in the ping.
  • doc_id - the ping’s unique document identifier.
  • url_path - the path on the server to upload this ping to.

Returns

A fully assembled representation of the ping payload and associated metadata. If there is no data stored for the ping, None is returned.

Collects a snapshot for the given ping from storage and attach required meta information.

Arguments

  • glean - the Glean instance to collect data from.
  • ping - the ping to collect for.
  • reason - an optional reason code to include in the ping.

Returns

A fully assembled ping payload in a string encoded as JSON. If there is no data stored for the ping, None is returned.

Stores a ping to disk in the pings directory.

Clears any pending pings in the queue.

Trait Implementations

Returns the “default value” for a type. 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 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.