pub struct AttachmentBlob {
pub id: i32,
pub key: String,
pub file_name: String,
pub content_type: Option<String>,
pub byte_size: i64,
pub checksum: String,
pub service_name: String,
pub created_at: DateTime<Utc>,
}
Fields§
§id: i32
§key: String
§file_name: String
§content_type: Option<String>
§byte_size: i64
§checksum: String
§service_name: String
§created_at: DateTime<Utc>
Implementations§
Source§impl AttachmentBlob
impl AttachmentBlob
Sourcepub fn create(
db: &mut Connection,
item: &AttachmentBlobChangeset,
) -> QueryResult<Self>
pub fn create( db: &mut Connection, item: &AttachmentBlobChangeset, ) -> QueryResult<Self>
Sourcepub fn find_by_id(db: &mut Connection, item_id: i32) -> QueryResult<Self>
pub fn find_by_id(db: &mut Connection, item_id: i32) -> QueryResult<Self>
Sourcepub fn find_all_by_id(
db: &mut Connection,
item_ids: Vec<i32>,
) -> QueryResult<Vec<Self>>
pub fn find_all_by_id( db: &mut Connection, item_ids: Vec<i32>, ) -> QueryResult<Vec<Self>>
Sourcepub fn delete(db: &mut Connection, item_id: i32) -> QueryResult<usize>
pub fn delete(db: &mut Connection, item_id: i32) -> QueryResult<usize>
Sourcepub fn delete_all(db: &mut Connection, item_ids: Vec<i32>) -> QueryResult<usize>
pub fn delete_all(db: &mut Connection, item_ids: Vec<i32>) -> QueryResult<usize>
Trait Implementations§
Source§impl<'update> AsChangeset for &'update AttachmentBlob
impl<'update> AsChangeset for &'update AttachmentBlob
Source§type Changeset = <(Grouped<Eq<key, <&'update String as AsExpression<<key as Expression>::SqlType>>::Expression>>, Grouped<Eq<file_name, <&'update String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<content_type, <&'update String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Grouped<Eq<byte_size, <&'update i64 as AsExpression<<byte_size as Expression>::SqlType>>::Expression>>, Grouped<Eq<checksum, <&'update String as AsExpression<<checksum as Expression>::SqlType>>::Expression>>, Grouped<Eq<service_name, <&'update String as AsExpression<<service_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<created_at, <&'update DateTime<Utc> as AsExpression<<created_at as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Grouped<Eq<key, <&'update String as AsExpression<<key as Expression>::SqlType>>::Expression>>, Grouped<Eq<file_name, <&'update String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<content_type, <&'update String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Grouped<Eq<byte_size, <&'update i64 as AsExpression<<byte_size as Expression>::SqlType>>::Expression>>, Grouped<Eq<checksum, <&'update String as AsExpression<<checksum as Expression>::SqlType>>::Expression>>, Grouped<Eq<service_name, <&'update String as AsExpression<<service_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<created_at, <&'update DateTime<Utc> as AsExpression<<created_at as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
Source§fn as_changeset(self) -> <Self as AsChangeset>::Changeset
fn as_changeset(self) -> <Self as AsChangeset>::Changeset
Convert
self
into the actual update statement being executedSource§impl AsChangeset for AttachmentBlob
impl AsChangeset for AttachmentBlob
Source§type Changeset = <(Grouped<Eq<key, <String as AsExpression<<key as Expression>::SqlType>>::Expression>>, Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Grouped<Eq<byte_size, <i64 as AsExpression<<byte_size as Expression>::SqlType>>::Expression>>, Grouped<Eq<checksum, <String as AsExpression<<checksum as Expression>::SqlType>>::Expression>>, Grouped<Eq<service_name, <String as AsExpression<<service_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<created_at, <DateTime<Utc> as AsExpression<<created_at as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
type Changeset = <(Grouped<Eq<key, <String as AsExpression<<key as Expression>::SqlType>>::Expression>>, Grouped<Eq<file_name, <String as AsExpression<<file_name as Expression>::SqlType>>::Expression>>, Option<Grouped<Eq<content_type, <String as AsExpression<<content_type as Expression>::SqlType>>::Expression>>>, Grouped<Eq<byte_size, <i64 as AsExpression<<byte_size as Expression>::SqlType>>::Expression>>, Grouped<Eq<checksum, <String as AsExpression<<checksum as Expression>::SqlType>>::Expression>>, Grouped<Eq<service_name, <String as AsExpression<<service_name as Expression>::SqlType>>::Expression>>, Grouped<Eq<created_at, <DateTime<Utc> as AsExpression<<created_at as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset
The update statement this type represents
Source§fn as_changeset(self) -> <Self as AsChangeset>::Changeset
fn as_changeset(self) -> <Self as AsChangeset>::Changeset
Convert
self
into the actual update statement being executedSource§impl Clone for AttachmentBlob
impl Clone for AttachmentBlob
Source§fn clone(&self) -> AttachmentBlob
fn clone(&self) -> AttachmentBlob
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AttachmentBlob
impl Debug for AttachmentBlob
Source§impl<'de> Deserialize<'de> for AttachmentBlob
impl<'de> Deserialize<'de> for AttachmentBlob
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasTable for AttachmentBlob
impl HasTable for AttachmentBlob
Source§impl<'ident> Identifiable for &'ident AttachmentBlob
impl<'ident> Identifiable for &'ident AttachmentBlob
Source§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7), __DB> for AttachmentBlob
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6, __ST7), __DB> for AttachmentBlob
Auto Trait Implementations§
impl Freeze for AttachmentBlob
impl RefUnwindSafe for AttachmentBlob
impl Send for AttachmentBlob
impl Sync for AttachmentBlob
impl Unpin for AttachmentBlob
impl UnwindSafe for AttachmentBlob
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> 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 moreSource§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.