[−][src]Struct weasel::metric::WriteMetrics
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]
&mut self,
id: UserMetricId<R>,
value: u64
) -> WeaselResult<(), R>
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]
&mut self,
id: UserMetricId<R>,
value: i64
) -> WeaselResult<(), R>
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]
&mut self,
id: UserMetricId<R>,
value: f64
) -> WeaselResult<(), R>
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: UserRules<R>,
<<R as BattleRules>::UR as UserRules<R>>::UserMetricId: RefUnwindSafe,
<R as BattleRules>::UR: UserRules<R>,
<<R as BattleRules>::UR as UserRules<R>>::UserMetricId: RefUnwindSafe,
impl<'a, R> Send for WriteMetrics<'a, R> where
<R as BattleRules>::UR: UserRules<R>,
<<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Send,
<R as BattleRules>::UR: UserRules<R>,
<<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Send,
impl<'a, R> Sync for WriteMetrics<'a, R> where
<R as BattleRules>::UR: UserRules<R>,
<<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Sync,
<R as BattleRules>::UR: UserRules<R>,
<<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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,