pub struct ValueRecorderBuilder<'a, T> { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Initialization configuration for a given ValueRecorder
.
Implementations§
Source§impl<'a, T> ValueRecorderBuilder<'a, T>
impl<'a, T> ValueRecorderBuilder<'a, T>
Sourcepub fn with_description<S: Into<String>>(self, description: S) -> Self
pub fn with_description<S: Into<String>>(self, description: S) -> Self
Set the description for this ValueRecorder
Sourcepub fn try_init(self) -> Result<ValueRecorder<T>>
pub fn try_init(self) -> Result<ValueRecorder<T>>
Creates a new value recorder.
Sourcepub fn init(self) -> ValueRecorder<T>
pub fn init(self) -> ValueRecorder<T>
Creates a new value recorder.
§Panics
This function panics if the instrument cannot be created. Use try_init if you want to handle errors.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for ValueRecorderBuilder<'a, T>
impl<'a, T> !RefUnwindSafe for ValueRecorderBuilder<'a, T>
impl<'a, T> Send for ValueRecorderBuilder<'a, T>where
T: Send,
impl<'a, T> Sync for ValueRecorderBuilder<'a, T>where
T: Sync,
impl<'a, T> Unpin for ValueRecorderBuilder<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for ValueRecorderBuilder<'a, T>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Available on crate feature
trace
only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Available on crate feature
trace
only.