Struct investments::db::models::Asset
source · pub struct Asset {
pub portfolio: String,
pub asset_type: AssetType,
pub symbol: String,
pub quantity: String,
}
Fields§
§portfolio: String
§asset_type: AssetType
§symbol: String
§quantity: String
Trait Implementations§
source§impl<'insert> Insertable<table> for &'insert Asset
impl<'insert> Insertable<table> for &'insert Asset
§type Values = <(Option<Grouped<Eq<portfolio, <&'insert String as AsExpression<<portfolio as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<asset_type, <&'insert AssetType as AsExpression<<asset_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<symbol, <&'insert String as AsExpression<<symbol as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<quantity, <&'insert String as AsExpression<<quantity as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<portfolio, <&'insert String as AsExpression<<portfolio as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<asset_type, <&'insert AssetType as AsExpression<<asset_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<symbol, <&'insert String as AsExpression<<symbol as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<quantity, <&'insert String as AsExpression<<quantity as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn values(
self
) -> <(Option<Eq<portfolio, &'insert String>>, Option<Eq<asset_type, &'insert AssetType>>, Option<Eq<symbol, &'insert String>>, Option<Eq<quantity, &'insert String>>) as Insertable<table>>::Values
fn values( self ) -> <(Option<Eq<portfolio, &'insert String>>, Option<Eq<asset_type, &'insert AssetType>>, Option<Eq<symbol, &'insert String>>, Option<Eq<quantity, &'insert String>>) as Insertable<table>>::Values
Construct
Self::Values
Read moresource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self
into a given table. Read moresource§impl Insertable<table> for Asset
impl Insertable<table> for Asset
§type Values = <(Option<Grouped<Eq<portfolio, <String as AsExpression<<portfolio as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<asset_type, <AssetType as AsExpression<<asset_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<symbol, <String as AsExpression<<symbol as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<quantity, <String as AsExpression<<quantity as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<portfolio, <String as AsExpression<<portfolio as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<asset_type, <AssetType as AsExpression<<asset_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<symbol, <String as AsExpression<<symbol as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<quantity, <String as AsExpression<<quantity as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn values(
self
) -> <(Option<Eq<portfolio, String>>, Option<Eq<asset_type, AssetType>>, Option<Eq<symbol, String>>, Option<Eq<quantity, String>>) as Insertable<table>>::Values
fn values( self ) -> <(Option<Eq<portfolio, String>>, Option<Eq<asset_type, AssetType>>, Option<Eq<symbol, String>>, Option<Eq<quantity, String>>) as Insertable<table>>::Values
Construct
Self::Values
Read moresource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self
into a given table. Read moresource§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for Asset
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3> Queryable<(__ST0, __ST1, __ST2, __ST3), __DB> for Asset
impl UndecoratedInsertRecord<table> for Asset
Auto Trait Implementations§
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
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 more§impl<T> Pointable for T
impl<T> Pointable for T
source§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.