pub struct TextScope<W: Write + Send + Sync + 'static> { /* private fields */ }
Expand description
A scope for text metrics.
Trait Implementations§
source§impl<W: Write + Send + Sync + 'static> Buffered for TextScope<W>
impl<W: Write + Send + Sync + 'static> Buffered for TextScope<W>
source§fn buffered(&self, buffering: Buffering) -> Self
fn buffered(&self, buffering: Buffering) -> Self
Return a clone with the specified buffering set.
source§fn get_buffering(&self) -> Buffering
fn get_buffering(&self) -> Buffering
Return the current buffering strategy.
source§fn is_buffered(&self) -> bool
fn is_buffered(&self) -> bool
Returns false if the current buffering strategy is
Buffering::Unbuffered
.
Returns true otherwise.source§impl<W: Write + Send + Sync + 'static> InputScope for TextScope<W>
impl<W: Write + Send + Sync + 'static> InputScope for TextScope<W>
source§fn new_metric(&self, name: MetricName, kind: InputKind) -> InputMetric
fn new_metric(&self, name: MetricName, kind: InputKind) -> InputMetric
Define a generic metric of the specified type.
It is preferable to use counter() / marker() / timer() / gauge() methods.
source§impl<W: Write + Send + Sync + 'static> WithAttributes for TextScope<W>
impl<W: Write + Send + Sync + 'static> WithAttributes for TextScope<W>
source§fn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Return attributes of component.
source§fn mut_attributes(&mut self) -> &mut Attributes
fn mut_attributes(&mut self) -> &mut Attributes
Return attributes of component for mutation.
source§fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
Clone the component and mutate its attributes at once.
Auto Trait Implementations§
impl<W> Freeze for TextScope<W>
impl<W> !RefUnwindSafe for TextScope<W>
impl<W> Send for TextScope<W>
impl<W> Sync for TextScope<W>
impl<W> Unpin for TextScope<W>
impl<W> !UnwindSafe for TextScope<W>
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> Observe for Twhere
T: InputScope + WithAttributes,
impl<T> Observe for Twhere
T: InputScope + WithAttributes,
§type Inner = T
type Inner = T
The inner type for the
ObserveWhen
. Read moresource§impl<T> OnFlush for Twhere
T: Flush + WithAttributes,
impl<T> OnFlush for Twhere
T: Flush + WithAttributes,
source§fn notify_flush_listeners(&self)
fn notify_flush_listeners(&self)
Notify registered listeners of an impending flush.
source§impl<T> Prefixed for Twhere
T: WithAttributes,
impl<T> Prefixed for Twhere
T: WithAttributes,
source§fn get_prefixes(&self) -> &NameParts
fn get_prefixes(&self) -> &NameParts
Returns namespace of component.
source§fn add_prefix<S>(&self, name: S) -> T
👎Deprecated since 0.7.2: Use named() or add_name()
fn add_prefix<S>(&self, name: S) -> T
Append a name to the existing names. Return a clone of the component with the updated names.
source§fn add_name<S>(&self, name: S) -> T
fn add_name<S>(&self, name: S) -> T
Append a name to the existing names. Return a clone of the component with the updated names.
source§fn named<S>(&self, name: S) -> T
fn named<S>(&self, name: S) -> T
Replace any existing names with a single name.
Return a clone of the component with the new name.
If multiple names are required, add_name
may also be used.
source§fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName
fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName
Append any name parts to the name’s namespace.
source§fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName
fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName
Prepend any name parts to the name’s namespace.
source§impl<T> ScheduleFlush for T
impl<T> ScheduleFlush for T
source§fn flush_every(&self, period: Duration) -> CancelHandle
fn flush_every(&self, period: Duration) -> CancelHandle
Flush this scope at regular intervals.