pub struct Interval {
months: i32,
days: i32,
usecs: i64,
}
Expand description
Every interval can be represented by a Interval
.
Note that the difference between Interval and Instant.
For example, 5 yrs 1 month 25 days 23:22:57
is a interval (Can be interpreted by Interval Unit
with months = 61, days = 25, usecs = (57 + 23 * 3600 + 22 * 60) * 1000000),
1970-01-01 04:05:06
is a Instant or Timestamp
One month may contain 28/31 days. One day may contain 23/25 hours.
This internals is learned from PG:
https://www.postgresql.org/docs/9.1/datatype-datetime.html#:~:text=field%20is%20negative.-,Internally,-interval%20values%20are
Fields§
§months: i32
§days: i32
§usecs: i64
Implementations§
source§impl Interval
impl Interval
pub const USECS_PER_DAY: i64 = 86_400_000_000i64
pub const USECS_PER_MONTH: i64 = 2_592_000_000_000i64
pub const USECS_PER_SEC: i64 = 1_000_000i64
sourcepub fn from_month_day_usec(months: i32, days: i32, usecs: i64) -> Self
pub fn from_month_day_usec(months: i32, days: i32, usecs: i64) -> Self
Creates a new Interval
from the given number of months, days, and microseconds.
sourcepub fn months(&self) -> i32
pub fn months(&self) -> i32
Returns the total number of whole months.
Note the difference between months
and months_field
.
We have: months = years_field * 12 + months_field
§Example
let interval: Interval = "5 yrs 1 month".parse().unwrap();
assert_eq!(interval.months(), 61);
assert_eq!(interval.months_field(), 1);
sourcepub fn usecs(&self) -> i64
pub fn usecs(&self) -> i64
Returns the number of microseconds.
Note the difference between usecs
and seconds_in_micros
.
We have: usecs = (hours_field * 3600 + minutes_field * 60) * 1_000_000 + seconds_in_micros
.
sourcepub fn usecs_of_day(&self) -> u64
pub fn usecs_of_day(&self) -> u64
Calculates the remaining number of microseconds.
range: 0..86_400_000_000
Note the difference between usecs
and usecs_of_day
.
let interval: Interval = "-1:00:00".parse().unwrap();
assert_eq!(interval.usecs(), -1 * 60 * 60 * 1_000_000);
assert_eq!(interval.usecs_of_day(), 23 * 60 * 60 * 1_000_000);
sourcepub fn years_field(&self) -> i32
pub fn years_field(&self) -> i32
Returns the years field. range: unlimited
§Example
let interval: Interval = "2332 yrs 12 months".parse().unwrap();
assert_eq!(interval.years_field(), 2333);
sourcepub fn months_field(&self) -> i32
pub fn months_field(&self) -> i32
Returns the months field. range: -11..=11
§Example
let interval: Interval = "15 months".parse().unwrap();
assert_eq!(interval.months_field(), 3);
let interval: Interval = "-15 months".parse().unwrap();
assert_eq!(interval.months_field(), -3);
sourcepub fn days_field(&self) -> i32
pub fn days_field(&self) -> i32
Returns the days field. range: unlimited
§Example
let interval: Interval = "1 months 100 days 25:00:00".parse().unwrap();
assert_eq!(interval.days_field(), 100);
sourcepub fn hours_field(&self) -> i64
pub fn hours_field(&self) -> i64
Returns the hours field. range: unlimited
§Example
let interval: Interval = "25:00:00".parse().unwrap();
assert_eq!(interval.hours_field(), 25);
let interval: Interval = "-25:00:00".parse().unwrap();
assert_eq!(interval.hours_field(), -25);
sourcepub fn minutes_field(&self) -> i32
pub fn minutes_field(&self) -> i32
Returns the minutes field. range: -59..=-59
§Example
let interval: Interval = "00:20:00".parse().unwrap();
assert_eq!(interval.minutes_field(), 20);
let interval: Interval = "-00:20:00".parse().unwrap();
assert_eq!(interval.minutes_field(), -20);
sourcepub fn seconds_in_micros(&self) -> i32
pub fn seconds_in_micros(&self) -> i32
Returns the seconds field, including fractional parts, in microseconds.
range: -59_999_999..=59_999_999
§Example
let interval: Interval = "01:02:03.45678".parse().unwrap();
assert_eq!(interval.seconds_in_micros(), 3_456_780);
let interval: Interval = "-01:02:03.45678".parse().unwrap();
assert_eq!(interval.seconds_in_micros(), -3_456_780);
sourcepub fn epoch_in_micros(&self) -> i128
pub fn epoch_in_micros(&self) -> i128
Returns the total number of microseconds, as defined by PostgreSQL extract
.
Note this value is not used by interval ordering (IntervalCmpValue
) and is not consistent
with it.
pub fn from_protobuf(cursor: &mut Cursor<&[u8]>) -> ArrayResult<Interval>
pub fn to_protobuf<T: Write>(self, output: &mut T) -> ArrayResult<usize>
sourcepub fn checked_mul_int<I>(&self, rhs: I) -> Option<Self>
pub fn checked_mul_int<I>(&self, rhs: I) -> Option<Self>
Multiple Interval
by an integer with overflow check.
sourcefn from_floats(months: f64, days: f64, usecs: f64) -> Option<Self>
fn from_floats(months: f64, days: f64, usecs: f64) -> Option<Self>
Internal utility used by Self::mul_float
and Self::div_float
to adjust fractional
units. Not intended as general constructor.
sourcepub fn div_float<I>(&self, rhs: I) -> Option<Self>
pub fn div_float<I>(&self, rhs: I) -> Option<Self>
Divides Interval
by an integer/float with zero check.
sourcepub fn exact_div(&self, rhs: &Self) -> Option<i64>
pub fn exact_div(&self, rhs: &Self) -> Option<i64>
Performs an exact division, returns None
if for any unit, lhs % rhs != 0.
sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
Checks if Interval
is positive.
sourcepub fn is_never_negative(&self) -> bool
pub fn is_never_negative(&self) -> bool
Checks if all fields of Interval
are all non-negative.
sourcepub const fn truncate_millis(self) -> Self
pub const fn truncate_millis(self) -> Self
Truncate the interval to the precision of milliseconds.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(
interval.truncate_millis().to_string(),
"5 years 1 mon 25 days 23:22:57.123"
);
sourcepub const fn truncate_second(self) -> Self
pub const fn truncate_second(self) -> Self
Truncate the interval to the precision of seconds.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(
interval.truncate_second().to_string(),
"5 years 1 mon 25 days 23:22:57"
);
sourcepub const fn truncate_minute(self) -> Self
pub const fn truncate_minute(self) -> Self
Truncate the interval to the precision of minutes.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(
interval.truncate_minute().to_string(),
"5 years 1 mon 25 days 23:22:00"
);
sourcepub const fn truncate_hour(self) -> Self
pub const fn truncate_hour(self) -> Self
Truncate the interval to the precision of hours.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(
interval.truncate_hour().to_string(),
"5 years 1 mon 25 days 23:00:00"
);
sourcepub const fn truncate_day(self) -> Self
pub const fn truncate_day(self) -> Self
Truncate the interval to the precision of days.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_day().to_string(), "5 years 1 mon 25 days");
sourcepub const fn truncate_month(self) -> Self
pub const fn truncate_month(self) -> Self
Truncate the interval to the precision of months.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_month().to_string(), "5 years 1 mon");
sourcepub const fn truncate_quarter(self) -> Self
pub const fn truncate_quarter(self) -> Self
Truncate the interval to the precision of quarters.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_quarter().to_string(), "5 years");
sourcepub const fn truncate_year(self) -> Self
pub const fn truncate_year(self) -> Self
Truncate the interval to the precision of years.
§Example
let interval: Interval = "5 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_year().to_string(), "5 years");
sourcepub const fn truncate_decade(self) -> Self
pub const fn truncate_decade(self) -> Self
Truncate the interval to the precision of decades.
§Example
let interval: Interval = "15 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_decade().to_string(), "10 years");
sourcepub const fn truncate_century(self) -> Self
pub const fn truncate_century(self) -> Self
Truncate the interval to the precision of centuries.
§Example
let interval: Interval = "115 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_century().to_string(), "100 years");
sourcepub const fn truncate_millennium(self) -> Self
pub const fn truncate_millennium(self) -> Self
Truncate the interval to the precision of millenniums.
§Example
let interval: Interval = "1115 years 1 mon 25 days 23:22:57.123".parse().unwrap();
assert_eq!(interval.truncate_millennium().to_string(), "1000 years");
pub fn justify_hour(self) -> Option<Self>
source§impl Interval
impl Interval
pub fn as_iso_8601(&self) -> String
sourcepub fn from_iso_8601(s: &str) -> Result<Self, IntervalParseError>
pub fn from_iso_8601(s: &str) -> Result<Self, IntervalParseError>
Converts str to interval
The input str must have the following format:
P<years>Y<months>M<days>DT<hours>H<minutes>M<seconds>S
Example
- P1Y2M3DT4H5M6.78S
source§impl Interval
impl Interval
fn parse_sql_standard( s: &str, leading_field: DateTimeField, ) -> Result<Self, IntervalParseError>
fn parse_postgres(s: &str) -> Result<Self, IntervalParseError>
pub fn parse_with_fields( s: &str, leading_field: Option<DateTimeField>, ) -> Result<Self, IntervalParseError>
Trait Implementations§
source§impl CheckedAdd<Interval> for Timestamp
impl CheckedAdd<Interval> for Timestamp
source§impl CheckedAdd for Interval
impl CheckedAdd for Interval
source§fn checked_add(&self, other: &Self) -> Option<Self>
fn checked_add(&self, other: &Self) -> Option<Self>
None
is
returned.source§impl CheckedNeg for Interval
impl CheckedNeg for Interval
source§fn checked_neg(&self) -> Option<Self>
fn checked_neg(&self) -> Option<Self>
None
for results that can’t be represented, like signed MIN
values that can’t be positive, or non-zero unsigned values that can’t be negative. Read moresource§impl CheckedSub for Interval
impl CheckedSub for Interval
source§fn checked_sub(&self, other: &Self) -> Option<Self>
fn checked_sub(&self, other: &Self) -> Option<Self>
None
is returned.source§impl<'de> Deserialize<'de> for Interval
impl<'de> Deserialize<'de> for Interval
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl From<&Interval> for Interval
impl From<&Interval> for Interval
source§fn from(p: &PbInterval) -> Self
fn from(p: &PbInterval) -> Self
source§impl From<Interval> for IntervalCmpValue
impl From<Interval> for IntervalCmpValue
source§impl From<Interval> for ScalarImpl
impl From<Interval> for ScalarImpl
source§impl<'scalar> From<Interval> for ScalarRefImpl<'scalar>
impl<'scalar> From<Interval> for ScalarRefImpl<'scalar>
source§impl From<Interval> for Time
impl From<Interval> for Time
In PostgreSQL
, casting from interval to time discards the days part.
§Example
use std::str::FromStr;
use risingwave_common::types::{Interval, Time};
let interval = Interval::from_month_day_usec(1, 2, 61000003);
let time = Time::from(interval);
assert_eq!(time, Time::from_str("00:01:01.000003").unwrap());
let interval = Interval::from_month_day_usec(0, 0, -61000003);
let time = Time::from(interval);
assert_eq!(time, Time::from_str("23:58:58.999997").unwrap());
source§impl FromIntoArrow for Interval
impl FromIntoArrow for Interval
source§impl FromIntoArrow for Interval
impl FromIntoArrow for Interval
source§impl<'a> FromSql<'a> for Interval
impl<'a> FromSql<'a> for Interval
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Interval, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Interval, Box<dyn Error + Sync + Send>>
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Type
.source§impl HashKeyDe for Interval
impl HashKeyDe for Interval
fn deserialize(_data_type: &DataType, buf: impl Buf) -> Self
source§impl HashKeySer<'_> for Interval
impl HashKeySer<'_> for Interval
source§fn serialize_into(self, buf: impl BufMut)
fn serialize_into(self, buf: impl BufMut)
source§fn exact_size() -> Option<usize>
fn exact_size() -> Option<usize>
Some
if the serialized size is known for this scalar type.source§fn estimated_size(self) -> usize
fn estimated_size(self) -> usize
source§impl IntervalTestExt for Interval
impl IntervalTestExt for Interval
source§impl Into<Interval> for Interval
impl Into<Interval> for Interval
Duplicated logic only used by HopWindow
. See #8452.
source§fn into(self) -> PbInterval
fn into(self) -> PbInterval
source§impl Ord for Interval
impl Ord for Interval
source§impl PartialOrd for Interval
impl PartialOrd for Interval
source§impl PrimitiveArrayItemType for Interval
impl PrimitiveArrayItemType for Interval
source§fn erase_array_type(arr: PrimitiveArray<Self>) -> ArrayImpl
fn erase_array_type(arr: PrimitiveArray<Self>) -> ArrayImpl
ArrayImpl
.source§fn try_into_array(arr: ArrayImpl) -> Option<PrimitiveArray<Self>>
fn try_into_array(arr: ArrayImpl) -> Option<PrimitiveArray<Self>>
ArrayImpl
to self.source§fn try_into_array_ref(arr: &ArrayImpl) -> Option<&PrimitiveArray<Self>>
fn try_into_array_ref(arr: &ArrayImpl) -> Option<&PrimitiveArray<Self>>
ArrayImpl
to self.source§fn array_type() -> ArrayType
fn array_type() -> ArrayType
fn to_protobuf<T: Write>(self, output: &mut T) -> ArrayResult<usize>
fn from_protobuf(cur: &mut Cursor<&[u8]>) -> ArrayResult<Self>
source§impl Scalar for Interval
impl Scalar for Interval
Implement Scalar
for Interval
.
source§type ScalarRefType<'a> = Interval
type ScalarRefType<'a> = Interval
Scalar
source§fn as_scalar_ref(&self) -> Interval
fn as_scalar_ref(&self) -> Interval
fn to_scalar_value(self) -> ScalarImpl
source§impl ScalarRef<'_> for Interval
impl ScalarRef<'_> for Interval
Implement ScalarRef
for Interval
.
source§type ScalarType = Interval
type ScalarType = Interval
ScalarType
is the owned type of current ScalarRef
.source§fn to_owned_scalar(&self) -> Interval
fn to_owned_scalar(&self) -> Interval
ScalarRef
to an owned scalar.source§fn hash_scalar<H: Hasher>(&self, state: &mut H)
fn hash_scalar<H: Hasher>(&self, state: &mut H)
source§impl Serialize for Interval
impl Serialize for Interval
Loss of information during the process due to IntervalCmpValue
. Only intended for
memcomparable encoding.
source§impl ToBinary for Interval
impl ToBinary for Interval
fn to_binary_with_type(&self, ty: &DataType) -> Result<Bytes, ToBinaryError>
source§impl ToSql for Interval
impl ToSql for Interval
source§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
source§fn to_sql(
&self,
_: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Send + Sync + 'static>>
fn to_sql( &self, _: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Send + Sync + 'static>>
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Type
.§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
source§impl ToText for Interval
impl ToText for Interval
source§fn write<W: Write>(&self, f: &mut W) -> Result
fn write<W: Write>(&self, f: &mut W) -> Result
source§fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result
source§fn to_text_with_type(&self, ty: &DataType) -> String
fn to_text_with_type(&self, ty: &DataType) -> String
source§impl TryFrom<ScalarImpl> for Interval
impl TryFrom<ScalarImpl> for Interval
source§type Error = ArrayError
type Error = ArrayError
source§fn try_from(val: ScalarImpl) -> ArrayResult<Self>
fn try_from(val: ScalarImpl) -> ArrayResult<Self>
source§impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for Interval
impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for Interval
source§type Error = ArrayError
type Error = ArrayError
source§fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>
source§impl<'a> WithDataType for &'a Interval
impl<'a> WithDataType for &'a Interval
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
DataType
for the rust type.source§impl<'a> WithDataType for &'a mut Interval
impl<'a> WithDataType for &'a mut Interval
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
DataType
for the rust type.source§impl WithDataType for Box<Interval>
impl WithDataType for Box<Interval>
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
DataType
for the rust type.source§impl WithDataType for Interval
impl WithDataType for Interval
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
DataType
for the rust type.impl Copy for Interval
impl Eq for Interval
impl ZeroHeapSize for Interval
Auto Trait Implementations§
impl Freeze for Interval
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
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
§impl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
self
as a ToSql
trait object.source§impl<T> CheckedAdd for Twhere
T: CheckedAdd,
impl<T> CheckedAdd for Twhere
T: CheckedAdd,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<T> EstimateSize for Twhere
T: ZeroHeapSize,
impl<T> EstimateSize for Twhere
T: ZeroHeapSize,
source§fn estimated_heap_size(&self) -> usize
fn estimated_heap_size(&self) -> usize
source§fn estimated_size(&self) -> usizewhere
Self: Sized,
fn estimated_size(&self) -> usizewhere
Self: Sized,
estimated_heap_size
and the size of Self
.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<T> IsNegative for T
impl<T> IsNegative for T
fn is_negative(&self) -> bool
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ScalarPartialOrd for Twhere
T: PrimitiveArrayItemType + Scalar,
impl<T> ScalarPartialOrd for Twhere
T: PrimitiveArrayItemType + Scalar,
fn scalar_cmp(&self, other: T) -> Option<Ordering>
source§impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
source§fn to_owned_datum(self) -> Option<ScalarImpl>
fn to_owned_datum(self) -> Option<ScalarImpl>
Datum
.