pub struct MetricKey<'a> {
pub id: i64,
pub key: Cow<'a, str>,
pub unit: Cow<'a, str>,
pub description: Cow<'a, str>,
}
Expand description
Metric key
Fields§
§id: i64
primary key of metric key
key: Cow<'a, str>
Actual key
unit: Cow<'a, str>
Unit if any
description: Cow<'a, str>
Description of metric key if any
Trait Implementations§
Source§impl<'__b, __FK> BelongsTo<&MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
impl<'__b, __FK> BelongsTo<&MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
Source§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
Source§type ForeignKeyColumn = metric_key_id
type ForeignKeyColumn = metric_key_id
The database column representing the foreign key
of the table this struct represents
Source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
Source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
Source§impl<'__b, __FK> BelongsTo<MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
impl<'__b, __FK> BelongsTo<MetricKey<'__b>> for Metricwhere
__FK: Hash + Eq,
for<'__a> &'__a i64: Into<Option<&'__a __FK>>,
for<'__a> &'__a MetricKey<'__b>: Identifiable<Id = &'__a __FK>,
Source§type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
Source§type ForeignKeyColumn = metric_key_id
type ForeignKeyColumn = metric_key_id
The database column representing the foreign key
of the table this struct represents
Source§fn foreign_key(&self) -> Option<&Self::ForeignKey>
fn foreign_key(&self) -> Option<&Self::ForeignKey>
Returns the foreign key for
self
Source§fn foreign_key_column() -> Self::ForeignKeyColumn
fn foreign_key_column() -> Self::ForeignKeyColumn
Returns the foreign key column of this struct’s table
Source§impl<'a, 'ident> Identifiable for &'ident MetricKey<'a>
impl<'a, 'ident> Identifiable for &'ident MetricKey<'a>
Source§impl<'a, __DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for MetricKey<'a>where
(i64, Cow<'a, str>, Cow<'a, str>, Cow<'a, str>): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3), __DB>,
impl<'a, __DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for MetricKey<'a>where
(i64, Cow<'a, str>, Cow<'a, str>, Cow<'a, str>): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3), __DB>,
Auto Trait Implementations§
impl<'a> Freeze for MetricKey<'a>
impl<'a> RefUnwindSafe for MetricKey<'a>
impl<'a> Send for MetricKey<'a>
impl<'a> Sync for MetricKey<'a>
impl<'a> Unpin for MetricKey<'a>
impl<'a> UnwindSafe for MetricKey<'a>
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moreSource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
Source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.