pub struct NewDbMetadata {
pub media_id: String,
pub origin_server: OwnedServerName,
pub content_type: Option<String>,
pub disposition_type: Option<String>,
pub file_name: Option<String>,
pub file_extension: Option<String>,
pub file_size: i64,
pub file_hash: Option<String>,
pub created_by: Option<OwnedUserId>,
pub created_at: UnixMillis,
}Fields§
§media_id: String§origin_server: OwnedServerName§content_type: Option<String>§disposition_type: Option<String>§file_name: Option<String>§file_extension: Option<String>§file_size: i64§file_hash: Option<String>§created_by: Option<OwnedUserId>§created_at: UnixMillisTrait Implementations§
Source§impl Clone for NewDbMetadata
impl Clone for NewDbMetadata
Source§fn clone(&self) -> NewDbMetadata
fn clone(&self) -> NewDbMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NewDbMetadata
impl Debug for NewDbMetadata
Source§impl<'insert> Insertable<table> for &'insert NewDbMetadata
impl<'insert> Insertable<table> for &'insert NewDbMetadata
Source§type Values = <(Option<Grouped<Eq<media_id, <&'insert String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <&'insert OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <&'insert String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <&'insert String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <&'insert String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <&'insert String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <&'insert i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <&'insert String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <&'insert OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<media_id, <&'insert String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <&'insert OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <&'insert String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <&'insert String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <&'insert String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <&'insert String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <&'insert i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <&'insert String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <&'insert OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <&'insert UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<media_id, &'insert String>>, Option<Eq<origin_server, &'insert OwnedServerName>>, Option<Eq<content_type, &'insert String>>, Option<Eq<disposition_type, &'insert String>>, Option<Eq<file_name, &'insert String>>, Option<Eq<file_extension, &'insert String>>, Option<Eq<file_size, &'insert i64>>, Option<Eq<file_hash, &'insert String>>, Option<Eq<created_by, &'insert OwnedUserId>>, Option<Eq<created_at, &'insert UnixMillis>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<media_id, &'insert String>>, Option<Eq<origin_server, &'insert OwnedServerName>>, Option<Eq<content_type, &'insert String>>, Option<Eq<disposition_type, &'insert String>>, Option<Eq<file_name, &'insert String>>, Option<Eq<file_extension, &'insert String>>, Option<Eq<file_size, &'insert i64>>, Option<Eq<file_hash, &'insert String>>, Option<Eq<created_by, &'insert OwnedUserId>>, Option<Eq<created_at, &'insert UnixMillis>>) 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 NewDbMetadata
impl Insertable<table> for NewDbMetadata
Source§type Values = <(Option<Grouped<Eq<media_id, <String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<media_id, <String as AsExpression<<media_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<origin_server, <OwnedServerName as AsExpression<<origin_server as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<disposition_type, <String as AsExpression<<disposition_type as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_extension, <String as AsExpression<<file_extension as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_size, <i64 as AsExpression<<file_size as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<file_hash, <String as AsExpression<<file_hash as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_by, <OwnedUserId as AsExpression<<created_by as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<created_at, <UnixMillis as AsExpression<<created_at as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<media_id, String>>, Option<Eq<origin_server, OwnedServerName>>, Option<Eq<content_type, String>>, Option<Eq<disposition_type, String>>, Option<Eq<file_name, String>>, Option<Eq<file_extension, String>>, Option<Eq<file_size, i64>>, Option<Eq<file_hash, String>>, Option<Eq<created_by, OwnedUserId>>, Option<Eq<created_at, UnixMillis>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<media_id, String>>, Option<Eq<origin_server, OwnedServerName>>, Option<Eq<content_type, String>>, Option<Eq<disposition_type, String>>, Option<Eq<file_name, String>>, Option<Eq<file_extension, String>>, Option<Eq<file_size, i64>>, Option<Eq<file_hash, String>>, Option<Eq<created_by, OwnedUserId>>, Option<Eq<created_at, UnixMillis>>) 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 moreimpl UndecoratedInsertRecord<table> for NewDbMetadata
Auto Trait Implementations§
impl Freeze for NewDbMetadata
impl RefUnwindSafe for NewDbMetadata
impl Send for NewDbMetadata
impl Sync for NewDbMetadata
impl Unpin for NewDbMetadata
impl UnwindSafe for NewDbMetadata
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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>
Converts
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>
Converts
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> 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