medialibapi::entity::media

Struct Media

pub struct Media {
Show 35 fields pub uuid: Uuid, pub image_list_name: Option<String>, pub rating: Option<i32>, pub publishing: Option<String>, pub format_type: Option<String>, pub realise_year: Option<i32>, pub description: Option<String>, pub image_resolution_x_min: Option<i32>, pub image_resolution_y_min: Option<i32>, pub image_resolution_x_max: Option<i32>, pub image_resolution_y_max: Option<i32>, pub updu: Option<Uuid>, pub updt: Option<NaiveDateTime>, pub ver: Option<i32>, pub book_name: Option<String>, pub book_isbn: Option<String>, pub book_page_count: Option<String>, pub audio_name: Option<String>, pub audio_bitrate: Option<f32>, pub audio_duration: Option<i32>, pub model_3d_name: Option<String>, pub video_name: Option<String>, pub video_duration: Option<i32>, pub video_resolution_x: Option<i32>, pub video_resolution_y: Option<i32>, pub video_fps: Option<f32>, pub media_language_name: Option<String>, pub keywords: Option<Vec<String>>, pub age_category_types: Option<Vec<String>>, pub authors: Option<Vec<Uuid>>, pub categories: Option<Vec<Uuid>>, pub favorites: Option<Vec<Uuid>>, pub file: Option<String>, pub organizations: Option<Vec<Uuid>>, pub rstatus: Option<RStatus>,
}

Fields§

§uuid: Uuid§image_list_name: Option<String>§rating: Option<i32>§publishing: Option<String>§format_type: Option<String>§realise_year: Option<i32>§description: Option<String>§image_resolution_x_min: Option<i32>§image_resolution_y_min: Option<i32>§image_resolution_x_max: Option<i32>§image_resolution_y_max: Option<i32>§updu: Option<Uuid>§updt: Option<NaiveDateTime>§ver: Option<i32>§book_name: Option<String>§book_isbn: Option<String>§book_page_count: Option<String>§audio_name: Option<String>§audio_bitrate: Option<f32>§audio_duration: Option<i32>§model_3d_name: Option<String>§video_name: Option<String>§video_duration: Option<i32>§video_resolution_x: Option<i32>§video_resolution_y: Option<i32>§video_fps: Option<f32>§media_language_name: Option<String>§keywords: Option<Vec<String>>§age_category_types: Option<Vec<String>>§authors: Option<Vec<Uuid>>§categories: Option<Vec<Uuid>>§favorites: Option<Vec<Uuid>>§file: Option<String>§organizations: Option<Vec<Uuid>>§rstatus: Option<RStatus>

Implementations§

§

impl Media

pub fn from_request(media_request: &MediaRequest) -> Media

pub fn to_response(&self) -> MediaResponse

pub fn to_response_list(medias: Vec<Media>) -> Vec<MediaResponse>

Trait Implementations§

§

impl<'update> AsChangeset for &'update Media

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Option<Eq<image_list_name, <&'update String as AsExpression<<image_list_name as Expression>::SqlType>>::Expression>>, Option<Eq<rating, <&'update i32 as AsExpression<<rating as Expression>::SqlType>>::Expression>>, Option<Eq<publishing, <&'update String as AsExpression<<publishing as Expression>::SqlType>>::Expression>>, Option<Eq<format_type, <&'update String as AsExpression<<format_type as Expression>::SqlType>>::Expression>>, Option<Eq<realise_year, <&'update i32 as AsExpression<<realise_year as Expression>::SqlType>>::Expression>>, Option<Eq<description, <&'update String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_min, <&'update i32 as AsExpression<<image_resolution_x_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_min, <&'update i32 as AsExpression<<image_resolution_y_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_max, <&'update i32 as AsExpression<<image_resolution_x_max as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_max, <&'update i32 as AsExpression<<image_resolution_y_max as Expression>::SqlType>>::Expression>>, Option<Eq<updu, <&'update Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<updt, <&'update NaiveDateTime as AsExpression<<updt as Expression>::SqlType>>::Expression>>, Option<Eq<ver, <&'update i32 as AsExpression<<ver as Expression>::SqlType>>::Expression>>, Option<Eq<book_name, <&'update String as AsExpression<<book_name as Expression>::SqlType>>::Expression>>, Option<Eq<book_isbn, <&'update String as AsExpression<<book_isbn as Expression>::SqlType>>::Expression>>, Option<Eq<book_page_count, <&'update String as AsExpression<<book_page_count as Expression>::SqlType>>::Expression>>, Option<Eq<audio_name, <&'update String as AsExpression<<audio_name as Expression>::SqlType>>::Expression>>, Option<Eq<audio_bitrate, <&'update f32 as AsExpression<<audio_bitrate as Expression>::SqlType>>::Expression>>, Option<Eq<audio_duration, <&'update i32 as AsExpression<<audio_duration as Expression>::SqlType>>::Expression>>, Option<Eq<model_3d_name, <&'update String as AsExpression<<model_3d_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_name, <&'update String as AsExpression<<video_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_duration, <&'update i32 as AsExpression<<video_duration as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_x, <&'update i32 as AsExpression<<video_resolution_x as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_y, <&'update i32 as AsExpression<<video_resolution_y as Expression>::SqlType>>::Expression>>, Option<Eq<video_fps, <&'update f32 as AsExpression<<video_fps as Expression>::SqlType>>::Expression>>, Option<Eq<media_language_name, <&'update String as AsExpression<<media_language_name as Expression>::SqlType>>::Expression>>, Option<Eq<keywords, <&'update Vec<String> as AsExpression<<keywords as Expression>::SqlType>>::Expression>>, Option<Eq<age_category_types, <&'update Vec<String> as AsExpression<<age_category_types as Expression>::SqlType>>::Expression>>, Option<Eq<authors, <&'update Vec<Uuid> as AsExpression<<authors as Expression>::SqlType>>::Expression>>, Option<Eq<categories, <&'update Vec<Uuid> as AsExpression<<categories as Expression>::SqlType>>::Expression>>, Option<Eq<favorites, <&'update Vec<Uuid> as AsExpression<<favorites as Expression>::SqlType>>::Expression>>, Option<Eq<file, <&'update String as AsExpression<<file as Expression>::SqlType>>::Expression>>, Option<Eq<organizations, <&'update Vec<Uuid> as AsExpression<<organizations as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <&'update RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset

The update statement this type represents
§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
§

impl<'update> AsChangeset for Media

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Option<Eq<image_list_name, <String as AsExpression<<image_list_name as Expression>::SqlType>>::Expression>>, Option<Eq<rating, <i32 as AsExpression<<rating as Expression>::SqlType>>::Expression>>, Option<Eq<publishing, <String as AsExpression<<publishing as Expression>::SqlType>>::Expression>>, Option<Eq<format_type, <String as AsExpression<<format_type as Expression>::SqlType>>::Expression>>, Option<Eq<realise_year, <i32 as AsExpression<<realise_year as Expression>::SqlType>>::Expression>>, Option<Eq<description, <String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_min, <i32 as AsExpression<<image_resolution_x_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_min, <i32 as AsExpression<<image_resolution_y_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_max, <i32 as AsExpression<<image_resolution_x_max as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_max, <i32 as AsExpression<<image_resolution_y_max as Expression>::SqlType>>::Expression>>, Option<Eq<updu, <Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<updt, <NaiveDateTime as AsExpression<<updt as Expression>::SqlType>>::Expression>>, Option<Eq<ver, <i32 as AsExpression<<ver as Expression>::SqlType>>::Expression>>, Option<Eq<book_name, <String as AsExpression<<book_name as Expression>::SqlType>>::Expression>>, Option<Eq<book_isbn, <String as AsExpression<<book_isbn as Expression>::SqlType>>::Expression>>, Option<Eq<book_page_count, <String as AsExpression<<book_page_count as Expression>::SqlType>>::Expression>>, Option<Eq<audio_name, <String as AsExpression<<audio_name as Expression>::SqlType>>::Expression>>, Option<Eq<audio_bitrate, <f32 as AsExpression<<audio_bitrate as Expression>::SqlType>>::Expression>>, Option<Eq<audio_duration, <i32 as AsExpression<<audio_duration as Expression>::SqlType>>::Expression>>, Option<Eq<model_3d_name, <String as AsExpression<<model_3d_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_name, <String as AsExpression<<video_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_duration, <i32 as AsExpression<<video_duration as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_x, <i32 as AsExpression<<video_resolution_x as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_y, <i32 as AsExpression<<video_resolution_y as Expression>::SqlType>>::Expression>>, Option<Eq<video_fps, <f32 as AsExpression<<video_fps as Expression>::SqlType>>::Expression>>, Option<Eq<media_language_name, <String as AsExpression<<media_language_name as Expression>::SqlType>>::Expression>>, Option<Eq<keywords, <Vec<String> as AsExpression<<keywords as Expression>::SqlType>>::Expression>>, Option<Eq<age_category_types, <Vec<String> as AsExpression<<age_category_types as Expression>::SqlType>>::Expression>>, Option<Eq<authors, <Vec<Uuid> as AsExpression<<authors as Expression>::SqlType>>::Expression>>, Option<Eq<categories, <Vec<Uuid> as AsExpression<<categories as Expression>::SqlType>>::Expression>>, Option<Eq<favorites, <Vec<Uuid> as AsExpression<<favorites as Expression>::SqlType>>::Expression>>, Option<Eq<file, <String as AsExpression<<file as Expression>::SqlType>>::Expression>>, Option<Eq<organizations, <Vec<Uuid> as AsExpression<<organizations as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>) as AsChangeset>::Changeset

The update statement this type represents
§

fn as_changeset(self) -> Self::Changeset

Convert self into the actual update statement being executed
§

impl Clone for Media

§

fn clone(&self) -> Media

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Media

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Default for Media

§

fn default() -> Media

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for Media

§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl HasTable for Media

§

type Table = table

The table this type is associated with.
§

fn table() -> Self::Table

Returns the table this type is associated with.
§

impl<'ident> Identifiable for &'ident Media

§

type Id = &'ident Uuid

The type of this struct’s identifier. Read more
§

fn id(self) -> Self::Id

Returns the identifier for this record. Read more
§

impl<'insert> Insertable<table> for &'insert Media

§

type Values = <(Option<Eq<uuid, <&'insert Uuid as AsExpression<<uuid as Expression>::SqlType>>::Expression>>, Option<Eq<image_list_name, <&'insert String as AsExpression<<image_list_name as Expression>::SqlType>>::Expression>>, Option<Eq<rating, <&'insert i32 as AsExpression<<rating as Expression>::SqlType>>::Expression>>, Option<Eq<publishing, <&'insert String as AsExpression<<publishing as Expression>::SqlType>>::Expression>>, Option<Eq<format_type, <&'insert String as AsExpression<<format_type as Expression>::SqlType>>::Expression>>, Option<Eq<realise_year, <&'insert i32 as AsExpression<<realise_year as Expression>::SqlType>>::Expression>>, Option<Eq<description, <&'insert String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_min, <&'insert i32 as AsExpression<<image_resolution_x_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_min, <&'insert i32 as AsExpression<<image_resolution_y_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_max, <&'insert i32 as AsExpression<<image_resolution_x_max as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_max, <&'insert i32 as AsExpression<<image_resolution_y_max as Expression>::SqlType>>::Expression>>, Option<Eq<updu, <&'insert Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<updt, <&'insert NaiveDateTime as AsExpression<<updt as Expression>::SqlType>>::Expression>>, Option<Eq<ver, <&'insert i32 as AsExpression<<ver as Expression>::SqlType>>::Expression>>, Option<Eq<book_name, <&'insert String as AsExpression<<book_name as Expression>::SqlType>>::Expression>>, Option<Eq<book_isbn, <&'insert String as AsExpression<<book_isbn as Expression>::SqlType>>::Expression>>, Option<Eq<book_page_count, <&'insert String as AsExpression<<book_page_count as Expression>::SqlType>>::Expression>>, Option<Eq<audio_name, <&'insert String as AsExpression<<audio_name as Expression>::SqlType>>::Expression>>, Option<Eq<audio_bitrate, <&'insert f32 as AsExpression<<audio_bitrate as Expression>::SqlType>>::Expression>>, Option<Eq<audio_duration, <&'insert i32 as AsExpression<<audio_duration as Expression>::SqlType>>::Expression>>, Option<Eq<model_3d_name, <&'insert String as AsExpression<<model_3d_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_name, <&'insert String as AsExpression<<video_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_duration, <&'insert i32 as AsExpression<<video_duration as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_x, <&'insert i32 as AsExpression<<video_resolution_x as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_y, <&'insert i32 as AsExpression<<video_resolution_y as Expression>::SqlType>>::Expression>>, Option<Eq<video_fps, <&'insert f32 as AsExpression<<video_fps as Expression>::SqlType>>::Expression>>, Option<Eq<media_language_name, <&'insert String as AsExpression<<media_language_name as Expression>::SqlType>>::Expression>>, Option<Eq<keywords, <&'insert Vec<String> as AsExpression<<keywords as Expression>::SqlType>>::Expression>>, Option<Eq<age_category_types, <&'insert Vec<String> as AsExpression<<age_category_types as Expression>::SqlType>>::Expression>>, Option<Eq<authors, <&'insert Vec<Uuid> as AsExpression<<authors as Expression>::SqlType>>::Expression>>, Option<Eq<categories, <&'insert Vec<Uuid> as AsExpression<<categories as Expression>::SqlType>>::Expression>>, Option<Eq<favorites, <&'insert Vec<Uuid> as AsExpression<<favorites as Expression>::SqlType>>::Expression>>, Option<Eq<file, <&'insert String as AsExpression<<file as Expression>::SqlType>>::Expression>>, Option<Eq<organizations, <&'insert Vec<Uuid> as AsExpression<<organizations as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <&'insert RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
§

fn values(self) -> Self::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where Self: Sized,

Insert self into a given table. Read more
§

impl<'insert> Insertable<table> for Media

§

type Values = <(Option<Eq<uuid, <Uuid as AsExpression<<uuid as Expression>::SqlType>>::Expression>>, Option<Eq<image_list_name, <String as AsExpression<<image_list_name as Expression>::SqlType>>::Expression>>, Option<Eq<rating, <i32 as AsExpression<<rating as Expression>::SqlType>>::Expression>>, Option<Eq<publishing, <String as AsExpression<<publishing as Expression>::SqlType>>::Expression>>, Option<Eq<format_type, <String as AsExpression<<format_type as Expression>::SqlType>>::Expression>>, Option<Eq<realise_year, <i32 as AsExpression<<realise_year as Expression>::SqlType>>::Expression>>, Option<Eq<description, <String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_min, <i32 as AsExpression<<image_resolution_x_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_min, <i32 as AsExpression<<image_resolution_y_min as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_x_max, <i32 as AsExpression<<image_resolution_x_max as Expression>::SqlType>>::Expression>>, Option<Eq<image_resolution_y_max, <i32 as AsExpression<<image_resolution_y_max as Expression>::SqlType>>::Expression>>, Option<Eq<updu, <Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<updt, <NaiveDateTime as AsExpression<<updt as Expression>::SqlType>>::Expression>>, Option<Eq<ver, <i32 as AsExpression<<ver as Expression>::SqlType>>::Expression>>, Option<Eq<book_name, <String as AsExpression<<book_name as Expression>::SqlType>>::Expression>>, Option<Eq<book_isbn, <String as AsExpression<<book_isbn as Expression>::SqlType>>::Expression>>, Option<Eq<book_page_count, <String as AsExpression<<book_page_count as Expression>::SqlType>>::Expression>>, Option<Eq<audio_name, <String as AsExpression<<audio_name as Expression>::SqlType>>::Expression>>, Option<Eq<audio_bitrate, <f32 as AsExpression<<audio_bitrate as Expression>::SqlType>>::Expression>>, Option<Eq<audio_duration, <i32 as AsExpression<<audio_duration as Expression>::SqlType>>::Expression>>, Option<Eq<model_3d_name, <String as AsExpression<<model_3d_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_name, <String as AsExpression<<video_name as Expression>::SqlType>>::Expression>>, Option<Eq<video_duration, <i32 as AsExpression<<video_duration as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_x, <i32 as AsExpression<<video_resolution_x as Expression>::SqlType>>::Expression>>, Option<Eq<video_resolution_y, <i32 as AsExpression<<video_resolution_y as Expression>::SqlType>>::Expression>>, Option<Eq<video_fps, <f32 as AsExpression<<video_fps as Expression>::SqlType>>::Expression>>, Option<Eq<media_language_name, <String as AsExpression<<media_language_name as Expression>::SqlType>>::Expression>>, Option<Eq<keywords, <Vec<String> as AsExpression<<keywords as Expression>::SqlType>>::Expression>>, Option<Eq<age_category_types, <Vec<String> as AsExpression<<age_category_types as Expression>::SqlType>>::Expression>>, Option<Eq<authors, <Vec<Uuid> as AsExpression<<authors as Expression>::SqlType>>::Expression>>, Option<Eq<categories, <Vec<Uuid> as AsExpression<<categories as Expression>::SqlType>>::Expression>>, Option<Eq<favorites, <Vec<Uuid> as AsExpression<<favorites as Expression>::SqlType>>::Expression>>, Option<Eq<file, <String as AsExpression<<file as Expression>::SqlType>>::Expression>>, Option<Eq<organizations, <Vec<Uuid> as AsExpression<<organizations as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more
§

fn values(self) -> Self::Values

Construct Self::Values Read more
Source§

fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
where Self: Sized,

Insert self into a given table. Read more
§

impl MetaFields for Media

§

fn update_fields(&mut self, user_id: Uuid)

§

fn init_fields(&mut self, user_id: Uuid)

§

impl PartialEq for Media

§

fn eq(&self, other: &Media) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Media

§

impl<__DB: Backend> QueryableByName<__DB> for Media
where Uuid: FromSql<SqlTypeOf<uuid>, __DB>, Option<String>: FromSql<SqlTypeOf<image_list_name>, __DB> + FromSql<SqlTypeOf<publishing>, __DB> + FromSql<SqlTypeOf<format_type>, __DB> + FromSql<SqlTypeOf<description>, __DB> + FromSql<SqlTypeOf<book_name>, __DB> + FromSql<SqlTypeOf<book_isbn>, __DB> + FromSql<SqlTypeOf<book_page_count>, __DB> + FromSql<SqlTypeOf<audio_name>, __DB> + FromSql<SqlTypeOf<model_3d_name>, __DB> + FromSql<SqlTypeOf<video_name>, __DB> + FromSql<SqlTypeOf<media_language_name>, __DB> + FromSql<SqlTypeOf<file>, __DB>, Option<i32>: FromSql<SqlTypeOf<rating>, __DB> + FromSql<SqlTypeOf<realise_year>, __DB> + FromSql<SqlTypeOf<image_resolution_x_min>, __DB> + FromSql<SqlTypeOf<image_resolution_y_min>, __DB> + FromSql<SqlTypeOf<image_resolution_x_max>, __DB> + FromSql<SqlTypeOf<image_resolution_y_max>, __DB> + FromSql<SqlTypeOf<ver>, __DB> + FromSql<SqlTypeOf<audio_duration>, __DB> + FromSql<SqlTypeOf<video_duration>, __DB> + FromSql<SqlTypeOf<video_resolution_x>, __DB> + FromSql<SqlTypeOf<video_resolution_y>, __DB>, Option<Uuid>: FromSql<SqlTypeOf<updu>, __DB>, Option<NaiveDateTime>: FromSql<SqlTypeOf<updt>, __DB>, Option<f32>: FromSql<SqlTypeOf<audio_bitrate>, __DB> + FromSql<SqlTypeOf<video_fps>, __DB>, Option<Vec<String>>: FromSql<SqlTypeOf<keywords>, __DB> + FromSql<SqlTypeOf<age_category_types>, __DB>, Option<Vec<Uuid>>: FromSql<SqlTypeOf<authors>, __DB> + FromSql<SqlTypeOf<categories>, __DB> + FromSql<SqlTypeOf<favorites>, __DB> + FromSql<SqlTypeOf<organizations>, __DB>, Option<RStatus>: FromSql<SqlTypeOf<rstatus>, __DB>,

§

fn build<__R: NamedRow<__DB>>(row: &__R) -> Result<Self>

Construct an instance of Self from the database row
§

impl Serialize for Media

§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for Media

§

impl<'insert> UndecoratedInsertRecord<table> for Media

Auto Trait Implementations§

§

impl Freeze for Media

§

impl RefUnwindSafe for Media

§

impl Send for Media

§

impl Sync for Media

§

impl Unpin for Media

§

impl UnwindSafe for Media

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
Source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T, Dst> ConvAsUtil<Dst> for T

Source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
Source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
Source§

impl<T> ConvUtil for T

Source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
Source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
Source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
Source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
Source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression
where Self: Sized + AsExpression<T>,

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<Src> TryFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

Source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<Src> ValueFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,