pub struct Metric { /* private fields */ }
Expand description
A metric.
Implementations§
source§impl Metric
impl Metric
sourcepub fn new<T>(name: T, kind: MetricKind, value: MetricValue) -> Metric
pub fn new<T>(name: T, kind: MetricKind, value: MetricValue) -> Metric
Creates a new Metric
with the given name
, kind
, and value
.
sourcepub fn new_with_metadata<T>(
name: T,
kind: MetricKind,
value: MetricValue,
metadata: EventMetadata
) -> Metric
pub fn new_with_metadata<T>( name: T, kind: MetricKind, value: MetricValue, metadata: EventMetadata ) -> Metric
Creates a new Metric
with the given name
, kind
, value
, and metadata
.
sourcepub fn with_name(self, name: impl Into<String>) -> Metric
pub fn with_name(self, name: impl Into<String>) -> Metric
Consumes this metric, returning it with an updated series based on the given name
.
sourcepub fn with_namespace<T>(self, namespace: Option<T>) -> Metric
pub fn with_namespace<T>(self, namespace: Option<T>) -> Metric
Consumes this metric, returning it with an updated series based on the given namespace
.
sourcepub fn with_timestamp(self, timestamp: Option<DateTime<Utc>>) -> Metric
pub fn with_timestamp(self, timestamp: Option<DateTime<Utc>>) -> Metric
Consumes this metric, returning it with an updated timestamp.
sourcepub fn with_interval_ms(self, interval_ms: Option<NonZero<u32>>) -> Metric
pub fn with_interval_ms(self, interval_ms: Option<NonZero<u32>>) -> Metric
Consumes this metric, returning it with an updated interval.
pub fn add_finalizer(&mut self, finalizer: EventFinalizer)
sourcepub fn with_batch_notifier(self, batch: &BatchNotifier) -> Metric
pub fn with_batch_notifier(self, batch: &BatchNotifier) -> Metric
Consumes this metric, returning it with an updated set of event finalizers attached to batch
.
sourcepub fn with_batch_notifier_option(self, batch: &Option<BatchNotifier>) -> Metric
pub fn with_batch_notifier_option(self, batch: &Option<BatchNotifier>) -> Metric
Consumes this metric, returning it with an optionally updated set of event finalizers attached to batch
.
Consumes this metric, returning it with an updated series based on the given tags
.
sourcepub fn with_value(self, value: MetricValue) -> Metric
pub fn with_value(self, value: MetricValue) -> Metric
Consumes this metric, returning it with an updated value.
sourcepub fn series(&self) -> &MetricSeries
pub fn series(&self) -> &MetricSeries
Gets a reference to the series of this metric.
The “series” is the name of the metric itself, including any tags. In other words, it is the unique identifier for a metric, although metrics of different values (counter vs gauge) may be able to co-exist in outside metrics implementations with identical series.
sourcepub fn data(&self) -> &MetricData
pub fn data(&self) -> &MetricData
Gets a reference to the data of this metric.
sourcepub fn data_mut(&mut self) -> &mut MetricData
pub fn data_mut(&mut self) -> &mut MetricData
Gets a mutable reference to the data of this metric.
sourcepub fn metadata(&self) -> &EventMetadata
pub fn metadata(&self) -> &EventMetadata
Gets a reference to the metadata of this metric.
sourcepub fn metadata_mut(&mut self) -> &mut EventMetadata
pub fn metadata_mut(&mut self) -> &mut EventMetadata
Gets a mutable reference to the metadata of this metric.
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Gets a reference to the name of this metric.
The name of the metric does not include the namespace or tags.
sourcepub fn namespace(&self) -> Option<&str>
pub fn namespace(&self) -> Option<&str>
Gets a reference to the namespace of this metric, if it exists.
sourcepub fn take_namespace(&mut self) -> Option<String>
pub fn take_namespace(&mut self) -> Option<String>
Takes the namespace out of this metric, if it exists, leaving it empty.
Gets a reference to the tags of this metric, if they exist.
Gets a mutable reference to the tags of this metric, if they exist.
sourcepub fn timestamp(&self) -> Option<DateTime<Utc>>
pub fn timestamp(&self) -> Option<DateTime<Utc>>
Gets a reference to the timestamp of this metric, if it exists.
sourcepub fn interval_ms(&self) -> Option<NonZero<u32>>
pub fn interval_ms(&self) -> Option<NonZero<u32>>
Gets a reference to the interval (in milliseconds) covered by this metric, if it exists.
sourcepub fn value(&self) -> &MetricValue
pub fn value(&self) -> &MetricValue
Gets a reference to the value of this metric.
sourcepub fn value_mut(&mut self) -> &mut MetricValue
pub fn value_mut(&mut self) -> &mut MetricValue
Gets a mutable reference to the value of this metric.
sourcepub fn kind(&self) -> MetricKind
pub fn kind(&self) -> MetricKind
Gets the kind of this metric.
sourcepub fn time(&self) -> MetricTime
pub fn time(&self) -> MetricTime
Gets the time information of this metric.
sourcepub fn into_parts(self) -> (MetricSeries, MetricData, EventMetadata)
pub fn into_parts(self) -> (MetricSeries, MetricData, EventMetadata)
Decomposes a Metric
into its individual parts.
sourcepub fn from_parts(
series: MetricSeries,
data: MetricData,
metadata: EventMetadata
) -> Metric
pub fn from_parts( series: MetricSeries, data: MetricData, metadata: EventMetadata ) -> Metric
Creates a Metric
directly from the raw components of another metric.
sourcepub fn into_absolute(self) -> Metric
pub fn into_absolute(self) -> Metric
Consumes this metric, returning it as an absolute metric.
If the metric was already absolute, nothing is changed.
sourcepub fn into_incremental(self) -> Metric
pub fn into_incremental(self) -> Metric
Consumes this metric, returning it as an incremental metric.
If the metric was already incremental, nothing is changed.
sourcepub fn remove_tag(&mut self, key: &str) -> Option<String>
pub fn remove_tag(&mut self, key: &str) -> Option<String>
Removes a tag from this metric, returning the value of the tag if the tag was previously in the metric.
Removes all the tags.
sourcepub fn tag_matches(&self, name: &str, value: &str) -> bool
pub fn tag_matches(&self, name: &str, value: &str) -> bool
Returns true
if name
tag is present, and matches the provided value
sourcepub fn tag_value(&self, name: &str) -> Option<String>
pub fn tag_value(&self, name: &str) -> Option<String>
Returns the string value of a tag, if it exists
sourcepub fn replace_tag(&mut self, name: String, value: String) -> Option<String>
pub fn replace_tag(&mut self, name: String, value: String) -> Option<String>
Inserts a tag into this metric.
If the metric did not have this tag, None
will be returned. Otherwise, Some(String)
will be returned,
containing the previous value of the tag.
Note: This will create the tags map if it is not present.
pub fn set_multi_value_tag( &mut self, name: String, values: impl IntoIterator<Item = TagValue> )
sourcepub fn add(&mut self, other: impl AsRef<MetricData>) -> bool
pub fn add(&mut self, other: impl AsRef<MetricData>) -> bool
Adds the data from the other
metric to this one.
The other metric must be incremental and contain the same value type as this one.
sourcepub fn update(&mut self, other: impl AsRef<MetricData>) -> bool
pub fn update(&mut self, other: impl AsRef<MetricData>) -> bool
Updates this metric by adding the data from other
.
sourcepub fn subtract(&mut self, other: impl AsRef<MetricData>) -> bool
pub fn subtract(&mut self, other: impl AsRef<MetricData>) -> bool
Subtracts the data from the other
metric from this one.
The other metric must contain the same value type as this one.
Reduces all the tag values to their single value, discarding any for which that value would be null. If the result is empty, the tag set is dropped.
Trait Implementations§
source§impl AsRef<MetricData> for Metric
impl AsRef<MetricData> for Metric
source§fn as_ref(&self) -> &MetricData
fn as_ref(&self) -> &MetricData
source§impl AsRef<MetricValue> for Metric
impl AsRef<MetricValue> for Metric
source§fn as_ref(&self) -> &MetricValue
fn as_ref(&self) -> &MetricValue
source§impl ByteSizeOf for Metric
impl ByteSizeOf for Metric
source§impl Configurable for Metric
impl Configurable for Metric
source§fn referenceable_name() -> Option<&'static str>
fn referenceable_name() -> Option<&'static str>
source§fn generate_schema(
schema_gen: &RefCell<SchemaGenerator>
) -> Result<SchemaObject, GenerateError>
fn generate_schema( schema_gen: &RefCell<SchemaGenerator> ) -> Result<SchemaObject, GenerateError>
source§fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
source§fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
source§impl<'de> Deserialize<'de> for Metric
impl<'de> Deserialize<'de> for Metric
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Metric, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Metric, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Display for Metric
impl Display for Metric
source§fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>
Display a metric using something like Prometheus’ text format:
TIMESTAMP NAMESPACE_NAME{TAGS} KIND DATA
TIMESTAMP is in ISO 8601 format with UTC time zone.
KIND is either =
for absolute metrics, or +
for incremental
metrics.
DATA is dependent on the type of metric, and is a simplified
representation of the data contents. In particular,
distributions, histograms, and summaries are represented as a
list of X@Y
words, where X
is the rate, count, or quantile,
and Y
is the value or bucket.
example:
2020-08-12T20:23:37.248661343Z vector_received_bytes_total{component_kind="sink",component_type="blackhole"} = 6391
source§impl EstimatedJsonEncodedSizeOf for Metric
impl EstimatedJsonEncodedSizeOf for Metric
fn estimated_json_encoded_size_of(&self) -> JsonSize
source§impl EventContainer for Metric
impl EventContainer for Metric
source§fn into_events(self) -> <Metric as EventContainer>::IntoIter
fn into_events(self) -> <Metric as EventContainer>::IntoIter
Event
.source§impl EventDataEq for Metric
impl EventDataEq for Metric
fn event_data_eq(&self, other: &Metric) -> bool
source§impl Finalizable for Metric
impl Finalizable for Metric
source§fn take_finalizers(&mut self) -> EventFinalizers
fn take_finalizers(&mut self) -> EventFinalizers
source§impl<'a> From<&'a mut Metric> for EventMutRef<'a>
impl<'a> From<&'a mut Metric> for EventMutRef<'a>
source§fn from(metric: &'a mut Metric) -> EventMutRef<'a>
fn from(metric: &'a mut Metric) -> EventMutRef<'a>
source§impl From<Metric> for EventArray
impl From<Metric> for EventArray
source§fn from(metric: Metric) -> EventArray
fn from(metric: Metric) -> EventArray
source§impl GetEventCountTags for Metric
impl GetEventCountTags for Metric
source§impl PartialEq for Metric
impl PartialEq for Metric
source§impl Serialize for Metric
impl Serialize for Metric
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl !Freeze for Metric
impl !RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl !UnwindSafe for Metric
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<'lua, T> FromLuaMulti<'lua> for Twhere
T: FromLua<'lua>,
impl<'lua, T> FromLuaMulti<'lua> for Twhere
T: FromLua<'lua>,
§fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
fn from_lua_args( args: MultiValue<'lua>, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>
unsafe fn from_stack_multi(nvals: i32, lua: &'lua Lua) -> Result<T, Error>
unsafe fn from_stack_args( nargs: i32, i: usize, to: Option<&str>, lua: &'lua Lua ) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize(&self, serializer: &mut dyn Serializer)
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString
]. Read more