[][src]Struct glean_preview::metrics::PingType

pub struct PingType { /* fields omitted */ }

Stores information about a ping.

This is required so that given metric data queued on disk we can send pings with the correct settings, e.g. whether it has a client_id.

Methods

impl PingType[src]

pub fn new<A: Into<String>>(
    name: A,
    include_client_id: bool,
    send_if_empty: bool
) -> Self
[src]

Create a new ping type for the given name, whether to include the client ID and whether to send this ping empty.

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.

pub fn send(&self) -> bool[src]

Send the ping.

Return value

Returns true if a ping was assembled and queued, false otherwise.

Trait Implementations

impl Clone for PingType[src]

impl Debug for PingType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,