metrique-macro 0.1.8

Library for working with unit of work metrics - #[metrics] macro
Documentation
---
source: metrique-macro/src/lib.rs
expression: parsed_file
---
enum Foo {
    Bar,
}
#[doc(hidden)]
pub enum FooValue {
    #[deprecated(
        note = "these fields will become private in a future release. To introspect an entry, use `metrique::writer::test_util::test_entry`"
    )]
    #[doc(hidden)]
    Bar,
}
impl ::std::convert::From<&'_ FooValue> for &'static str {
    fn from(value: &FooValue) -> Self {
        #[allow(deprecated)]
        match value {
            FooValue::Bar => "Bar",
        }
    }
}
impl ::std::convert::From<FooValue> for &'static str {
    fn from(value: FooValue) -> Self {
        <&str as ::std::convert::From<&_>>::from(&value)
    }
}
impl ::metrique::writer::Value for FooValue {
    fn write(&self, writer: impl ::metrique::writer::ValueWriter) {
        writer.string(::std::convert::Into::<&str>::into(self));
    }
}
impl ::metrique::writer::core::SampleGroup for FooValue {
    fn as_sample_group(&self) -> ::std::borrow::Cow<'static, str> {
        ::std::borrow::Cow::Borrowed(::std::convert::Into::<&str>::into(self))
    }
}
impl metrique::CloseValue for &'_ Foo {
    type Closed = FooValue;
    fn close(self) -> Self::Closed {
        #[allow(deprecated)]
        match self {
            Foo::Bar => FooValue::Bar,
        }
    }
}
impl metrique::CloseValue for Foo {
    type Closed = FooValue;
    fn close(self) -> Self::Closed {
        <&Self>::close(&self)
    }
}