[][src]Struct weasel::metric::WriteMetrics

pub struct WriteMetrics<'a, R: BattleRules> { /* fields omitted */ }

Handle to write metrics.

Implementations

impl<'a, R: BattleRules> WriteMetrics<'a, R>[src]

pub fn remove_user(&mut self, id: UserMetricId<R>)[src]

Removes an user metric.

pub fn add_user_u64(
    &mut self,
    id: UserMetricId<R>,
    value: u64
) -> WeaselResult<(), R>
[src]

Adds value to the user metric with the given id.

Creates the metric (initialized with value) if it doesn't exist. Returns an error if the metric exists, but its type is different.

pub fn add_user_i64(
    &mut self,
    id: UserMetricId<R>,
    value: i64
) -> WeaselResult<(), R>
[src]

Adds value to the user metric with the given id.

Creates the metric (initialized with value) if it doesn't exist. Returns an error if the metric exists, but its type is different.

pub fn add_user_f64(
    &mut self,
    id: UserMetricId<R>,
    value: f64
) -> WeaselResult<(), R>
[src]

Adds value to the user metric with the given id.

Creates the metric (initialized with value) if it doesn't exist. Returns an error if the metric exists, but its type is different.

Auto Trait Implementations

impl<'a, R> RefUnwindSafe for WriteMetrics<'a, R> where
    <<R as BattleRules>::UR as UserRules<R>>::UserMetricId: RefUnwindSafe

impl<'a, R> Send for WriteMetrics<'a, R> where
    <<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Send

impl<'a, R> Sync for WriteMetrics<'a, R> where
    <<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Sync

impl<'a, R> Unpin for WriteMetrics<'a, R>

impl<'a, R> !UnwindSafe for WriteMetrics<'a, R>

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,