pub enum Either<Single, Vec> {
Single(Single),
Vec(Vec),
}
Expand description
Either a single prometheus::Metric
or a prometheus::MetricVec
of
them, forming a Bundle
.
Variants§
Trait Implementations§
Source§impl<M, B> Bundle for Either<M, MetricVec<B>>
impl<M, B> Bundle for Either<M, MetricVec<B>>
Source§type Single = M
type Single = M
Type of single
prometheus::Metric
that may be stored in this
Bundle
.Source§fn get_single_metric(&self, key: &Key) -> Result<M>
fn get_single_metric(&self, key: &Key) -> Result<M>
Returns a single
prometheus::Metric
of this Bundle
,
identified by the provided metrics::Key
. Read moreimpl<Single: Copy, Vec: Copy> Copy for Either<Single, Vec>
Auto Trait Implementations§
impl<Single, Vec> Freeze for Either<Single, Vec>
impl<Single, Vec> RefUnwindSafe for Either<Single, Vec>where
Single: RefUnwindSafe,
Vec: RefUnwindSafe,
impl<Single, Vec> Send for Either<Single, Vec>
impl<Single, Vec> Sync for Either<Single, Vec>
impl<Single, Vec> Unpin for Either<Single, Vec>
impl<Single, Vec> UnwindSafe for Either<Single, Vec>where
Single: UnwindSafe,
Vec: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more