projectapi::entity::project

Struct Project

pub struct Project {
Show 35 fields pub uuid: Uuid, pub name: String, pub participants: Option<Json<Vec<ProjectUser>>>, pub curator: Uuid, pub activity_type: ActivityType, pub duration: Option<i32>, pub subject: Subject, pub project_goals: Option<String>, pub project_tasks: Option<String>, pub start_date: Option<NaiveDateTime>, pub end_date: Option<NaiveDateTime>, pub updt: Option<NaiveDateTime>, pub ver: Option<i32>, pub updu: Option<Uuid>, pub rstatus: Option<RStatus>, pub registration_status: RegistrationStatus, pub latitude: Option<f64>, pub longitude: Option<f64>, pub details: Json<Details>, pub description: Option<String>, pub project_avatar: String, pub main_picture: String, pub searchable: bool, pub chat: Option<Uuid>, pub social_group: Option<Uuid>, pub group_id: Option<Uuid>, pub repository: Option<String>, pub years_of_study: Option<Vec<i32>>, pub interaction_type: InteractionType, pub capacity: Option<i32>, pub available_below: Option<Uuid>, pub registration_type: RegistrationType, pub milestone: Option<Json<Vec<Milestone>>>, pub organization: Option<Uuid>, pub is_public: bool,
}
Expand description

§Arguments

  • activity_type - Type of project for dominant activity (research, creative, etc.)
  • subject_area_type - Type of project by subject area (mono-project interdisciplinary oversubject)
  • contact_type - type of project by nature of contacts(cross-class, cross-school)
  • count_participants_type - Type of project by count of participant (personal, pair project, group)
  • duration_type - Type of project by duration (episodic, short-term, etc.)
  • subject_type - Type of project by content (musical, linguistic, economic, etc.)
  • active_status - Project activity status (active, not active)
  • registration_status - Project registration status (open, close)

Fields§

§uuid: Uuid§name: String§participants: Option<Json<Vec<ProjectUser>>>§curator: Uuid§activity_type: ActivityType§duration: Option<i32>§subject: Subject§project_goals: Option<String>§project_tasks: Option<String>§start_date: Option<NaiveDateTime>§end_date: Option<NaiveDateTime>§updt: Option<NaiveDateTime>§ver: Option<i32>§updu: Option<Uuid>§rstatus: Option<RStatus>§registration_status: RegistrationStatus§latitude: Option<f64>§longitude: Option<f64>§details: Json<Details>§description: Option<String>§project_avatar: String§main_picture: String§searchable: bool§chat: Option<Uuid>§social_group: Option<Uuid>§group_id: Option<Uuid>§repository: Option<String>§years_of_study: Option<Vec<i32>>§interaction_type: InteractionType§capacity: Option<i32>§available_below: Option<Uuid>§registration_type: RegistrationType§milestone: Option<Json<Vec<Milestone>>>§organization: Option<Uuid>§is_public: bool

Implementations§

§

impl Project

pub fn from_request(project_request: &ProjectRequest) -> Project

pub fn to_response(&self, conn: &PgConnection) -> ProjectResponse

pub fn to_response_list( projects: Vec<Project>, conn: &PgConnection, ) -> Vec<ProjectResponse>

Trait Implementations§

§

impl<'update> AsChangeset for &'update Project

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Eq<name, <&'update String as AsExpression<<name as Expression>::SqlType>>::Expression>, Option<Eq<participants, <&'update Json<Vec<ProjectUser>> as AsExpression<<participants as Expression>::SqlType>>::Expression>>, Eq<curator, <&'update Uuid as AsExpression<<curator as Expression>::SqlType>>::Expression>, Eq<activity_type, <&'update ActivityType as AsExpression<<activity_type as Expression>::SqlType>>::Expression>, Option<Eq<duration, <&'update i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>, Eq<subject, <&'update Subject as AsExpression<<subject as Expression>::SqlType>>::Expression>, Option<Eq<project_goals, <&'update String as AsExpression<<project_goals as Expression>::SqlType>>::Expression>>, Option<Eq<project_tasks, <&'update String as AsExpression<<project_tasks as Expression>::SqlType>>::Expression>>, Option<Eq<start_date, <&'update NaiveDateTime as AsExpression<<start_date as Expression>::SqlType>>::Expression>>, Option<Eq<end_date, <&'update NaiveDateTime as AsExpression<<end_date 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<updu, <&'update Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <&'update RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>, Eq<registration_status, <&'update RegistrationStatus as AsExpression<<registration_status as Expression>::SqlType>>::Expression>, Option<Eq<latitude, <&'update f64 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <&'update f64 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Eq<details, <&'update Json<Details> as AsExpression<<details as Expression>::SqlType>>::Expression>, Option<Eq<description, <&'update String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Eq<project_avatar, <&'update String as AsExpression<<project_avatar as Expression>::SqlType>>::Expression>, Eq<main_picture, <&'update String as AsExpression<<main_picture as Expression>::SqlType>>::Expression>, Eq<searchable, <&'update bool as AsExpression<<searchable as Expression>::SqlType>>::Expression>, Option<Eq<chat, <&'update Uuid as AsExpression<<chat as Expression>::SqlType>>::Expression>>, Option<Eq<social_group, <&'update Uuid as AsExpression<<social_group as Expression>::SqlType>>::Expression>>, Option<Eq<group_id, <&'update Uuid as AsExpression<<group_id as Expression>::SqlType>>::Expression>>, Option<Eq<repository, <&'update String as AsExpression<<repository as Expression>::SqlType>>::Expression>>, Option<Eq<years_of_study, <&'update Vec<i32> as AsExpression<<years_of_study as Expression>::SqlType>>::Expression>>, Eq<interaction_type, <&'update InteractionType as AsExpression<<interaction_type as Expression>::SqlType>>::Expression>, Option<Eq<capacity, <&'update i32 as AsExpression<<capacity as Expression>::SqlType>>::Expression>>, Option<Eq<available_below, <&'update Uuid as AsExpression<<available_below as Expression>::SqlType>>::Expression>>, Eq<registration_type, <&'update RegistrationType as AsExpression<<registration_type as Expression>::SqlType>>::Expression>, Option<Eq<milestone, <&'update Json<Vec<Milestone>> as AsExpression<<milestone as Expression>::SqlType>>::Expression>>, Option<Eq<organization, <&'update Uuid as AsExpression<<organization as Expression>::SqlType>>::Expression>>, Eq<is_public, <&'update bool as AsExpression<<is_public 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 Project

§

type Target = table

The table which Self::Changeset will be updating
§

type Changeset = <(Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>, Option<Eq<participants, <Json<Vec<ProjectUser>> as AsExpression<<participants as Expression>::SqlType>>::Expression>>, Eq<curator, <Uuid as AsExpression<<curator as Expression>::SqlType>>::Expression>, Eq<activity_type, <ActivityType as AsExpression<<activity_type as Expression>::SqlType>>::Expression>, Option<Eq<duration, <i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>, Eq<subject, <Subject as AsExpression<<subject as Expression>::SqlType>>::Expression>, Option<Eq<project_goals, <String as AsExpression<<project_goals as Expression>::SqlType>>::Expression>>, Option<Eq<project_tasks, <String as AsExpression<<project_tasks as Expression>::SqlType>>::Expression>>, Option<Eq<start_date, <NaiveDateTime as AsExpression<<start_date as Expression>::SqlType>>::Expression>>, Option<Eq<end_date, <NaiveDateTime as AsExpression<<end_date 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<updu, <Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>, Eq<registration_status, <RegistrationStatus as AsExpression<<registration_status as Expression>::SqlType>>::Expression>, Option<Eq<latitude, <f64 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <f64 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Eq<details, <Json<Details> as AsExpression<<details as Expression>::SqlType>>::Expression>, Option<Eq<description, <String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Eq<project_avatar, <String as AsExpression<<project_avatar as Expression>::SqlType>>::Expression>, Eq<main_picture, <String as AsExpression<<main_picture as Expression>::SqlType>>::Expression>, Eq<searchable, <bool as AsExpression<<searchable as Expression>::SqlType>>::Expression>, Option<Eq<chat, <Uuid as AsExpression<<chat as Expression>::SqlType>>::Expression>>, Option<Eq<social_group, <Uuid as AsExpression<<social_group as Expression>::SqlType>>::Expression>>, Option<Eq<group_id, <Uuid as AsExpression<<group_id as Expression>::SqlType>>::Expression>>, Option<Eq<repository, <String as AsExpression<<repository as Expression>::SqlType>>::Expression>>, Option<Eq<years_of_study, <Vec<i32> as AsExpression<<years_of_study as Expression>::SqlType>>::Expression>>, Eq<interaction_type, <InteractionType as AsExpression<<interaction_type as Expression>::SqlType>>::Expression>, Option<Eq<capacity, <i32 as AsExpression<<capacity as Expression>::SqlType>>::Expression>>, Option<Eq<available_below, <Uuid as AsExpression<<available_below as Expression>::SqlType>>::Expression>>, Eq<registration_type, <RegistrationType as AsExpression<<registration_type as Expression>::SqlType>>::Expression>, Option<Eq<milestone, <Json<Vec<Milestone>> as AsExpression<<milestone as Expression>::SqlType>>::Expression>>, Option<Eq<organization, <Uuid as AsExpression<<organization as Expression>::SqlType>>::Expression>>, Eq<is_public, <bool as AsExpression<<is_public 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 Project

§

fn clone(&self) -> Project

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 Project

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Project

§

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 Project

§

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 Project

§

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 Project

§

type Values = <(Option<Eq<uuid, <&'insert Uuid as AsExpression<<uuid as Expression>::SqlType>>::Expression>>, Option<Eq<name, <&'insert String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<participants, <&'insert Json<Vec<ProjectUser>> as AsExpression<<participants as Expression>::SqlType>>::Expression>>, Option<Eq<curator, <&'insert Uuid as AsExpression<<curator as Expression>::SqlType>>::Expression>>, Option<Eq<activity_type, <&'insert ActivityType as AsExpression<<activity_type as Expression>::SqlType>>::Expression>>, Option<Eq<duration, <&'insert i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>, Option<Eq<subject, <&'insert Subject as AsExpression<<subject as Expression>::SqlType>>::Expression>>, Option<Eq<project_goals, <&'insert String as AsExpression<<project_goals as Expression>::SqlType>>::Expression>>, Option<Eq<project_tasks, <&'insert String as AsExpression<<project_tasks as Expression>::SqlType>>::Expression>>, Option<Eq<start_date, <&'insert NaiveDateTime as AsExpression<<start_date as Expression>::SqlType>>::Expression>>, Option<Eq<end_date, <&'insert NaiveDateTime as AsExpression<<end_date 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<updu, <&'insert Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <&'insert RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>, Option<Eq<registration_status, <&'insert RegistrationStatus as AsExpression<<registration_status as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <&'insert f64 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <&'insert f64 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<details, <&'insert Json<Details> as AsExpression<<details as Expression>::SqlType>>::Expression>>, Option<Eq<description, <&'insert String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<project_avatar, <&'insert String as AsExpression<<project_avatar as Expression>::SqlType>>::Expression>>, Option<Eq<main_picture, <&'insert String as AsExpression<<main_picture as Expression>::SqlType>>::Expression>>, Option<Eq<searchable, <&'insert bool as AsExpression<<searchable as Expression>::SqlType>>::Expression>>, Option<Eq<chat, <&'insert Uuid as AsExpression<<chat as Expression>::SqlType>>::Expression>>, Option<Eq<social_group, <&'insert Uuid as AsExpression<<social_group as Expression>::SqlType>>::Expression>>, Option<Eq<group_id, <&'insert Uuid as AsExpression<<group_id as Expression>::SqlType>>::Expression>>, Option<Eq<repository, <&'insert String as AsExpression<<repository as Expression>::SqlType>>::Expression>>, Option<Eq<years_of_study, <&'insert Vec<i32> as AsExpression<<years_of_study as Expression>::SqlType>>::Expression>>, Option<Eq<interaction_type, <&'insert InteractionType as AsExpression<<interaction_type as Expression>::SqlType>>::Expression>>, Option<Eq<capacity, <&'insert i32 as AsExpression<<capacity as Expression>::SqlType>>::Expression>>, Option<Eq<available_below, <&'insert Uuid as AsExpression<<available_below as Expression>::SqlType>>::Expression>>, Option<Eq<registration_type, <&'insert RegistrationType as AsExpression<<registration_type as Expression>::SqlType>>::Expression>>, Option<Eq<milestone, <&'insert Json<Vec<Milestone>> as AsExpression<<milestone as Expression>::SqlType>>::Expression>>, Option<Eq<organization, <&'insert Uuid as AsExpression<<organization as Expression>::SqlType>>::Expression>>, Option<Eq<is_public, <&'insert bool as AsExpression<<is_public 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 Project

§

type Values = <(Option<Eq<uuid, <Uuid as AsExpression<<uuid as Expression>::SqlType>>::Expression>>, Option<Eq<name, <String as AsExpression<<name as Expression>::SqlType>>::Expression>>, Option<Eq<participants, <Json<Vec<ProjectUser>> as AsExpression<<participants as Expression>::SqlType>>::Expression>>, Option<Eq<curator, <Uuid as AsExpression<<curator as Expression>::SqlType>>::Expression>>, Option<Eq<activity_type, <ActivityType as AsExpression<<activity_type as Expression>::SqlType>>::Expression>>, Option<Eq<duration, <i32 as AsExpression<<duration as Expression>::SqlType>>::Expression>>, Option<Eq<subject, <Subject as AsExpression<<subject as Expression>::SqlType>>::Expression>>, Option<Eq<project_goals, <String as AsExpression<<project_goals as Expression>::SqlType>>::Expression>>, Option<Eq<project_tasks, <String as AsExpression<<project_tasks as Expression>::SqlType>>::Expression>>, Option<Eq<start_date, <NaiveDateTime as AsExpression<<start_date as Expression>::SqlType>>::Expression>>, Option<Eq<end_date, <NaiveDateTime as AsExpression<<end_date 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<updu, <Uuid as AsExpression<<updu as Expression>::SqlType>>::Expression>>, Option<Eq<rstatus, <RStatus as AsExpression<<rstatus as Expression>::SqlType>>::Expression>>, Option<Eq<registration_status, <RegistrationStatus as AsExpression<<registration_status as Expression>::SqlType>>::Expression>>, Option<Eq<latitude, <f64 as AsExpression<<latitude as Expression>::SqlType>>::Expression>>, Option<Eq<longitude, <f64 as AsExpression<<longitude as Expression>::SqlType>>::Expression>>, Option<Eq<details, <Json<Details> as AsExpression<<details as Expression>::SqlType>>::Expression>>, Option<Eq<description, <String as AsExpression<<description as Expression>::SqlType>>::Expression>>, Option<Eq<project_avatar, <String as AsExpression<<project_avatar as Expression>::SqlType>>::Expression>>, Option<Eq<main_picture, <String as AsExpression<<main_picture as Expression>::SqlType>>::Expression>>, Option<Eq<searchable, <bool as AsExpression<<searchable as Expression>::SqlType>>::Expression>>, Option<Eq<chat, <Uuid as AsExpression<<chat as Expression>::SqlType>>::Expression>>, Option<Eq<social_group, <Uuid as AsExpression<<social_group as Expression>::SqlType>>::Expression>>, Option<Eq<group_id, <Uuid as AsExpression<<group_id as Expression>::SqlType>>::Expression>>, Option<Eq<repository, <String as AsExpression<<repository as Expression>::SqlType>>::Expression>>, Option<Eq<years_of_study, <Vec<i32> as AsExpression<<years_of_study as Expression>::SqlType>>::Expression>>, Option<Eq<interaction_type, <InteractionType as AsExpression<<interaction_type as Expression>::SqlType>>::Expression>>, Option<Eq<capacity, <i32 as AsExpression<<capacity as Expression>::SqlType>>::Expression>>, Option<Eq<available_below, <Uuid as AsExpression<<available_below as Expression>::SqlType>>::Expression>>, Option<Eq<registration_type, <RegistrationType as AsExpression<<registration_type as Expression>::SqlType>>::Expression>>, Option<Eq<milestone, <Json<Vec<Milestone>> as AsExpression<<milestone as Expression>::SqlType>>::Expression>>, Option<Eq<organization, <Uuid as AsExpression<<organization as Expression>::SqlType>>::Expression>>, Option<Eq<is_public, <bool as AsExpression<<is_public 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 Project

§

fn update_fields(&mut self, user_id: Uuid)

§

fn init_fields(&mut self, user_id: Uuid)

§

impl PartialEq for Project

§

fn eq(&self, other: &Project) -> 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 Project

§

impl<__DB: Backend> QueryableByName<__DB> for Project
where Uuid: FromSql<SqlTypeOf<uuid>, __DB> + FromSql<SqlTypeOf<curator>, __DB>, String: FromSql<SqlTypeOf<name>, __DB> + FromSql<SqlTypeOf<project_avatar>, __DB> + FromSql<SqlTypeOf<main_picture>, __DB>, Option<Json<Vec<ProjectUser>>>: FromSql<SqlTypeOf<participants>, __DB>, ActivityType: FromSql<SqlTypeOf<activity_type>, __DB>, Option<i32>: FromSql<SqlTypeOf<duration>, __DB> + FromSql<SqlTypeOf<ver>, __DB> + FromSql<SqlTypeOf<capacity>, __DB>, Subject: FromSql<SqlTypeOf<subject>, __DB>, Option<String>: FromSql<SqlTypeOf<project_goals>, __DB> + FromSql<SqlTypeOf<project_tasks>, __DB> + FromSql<SqlTypeOf<description>, __DB> + FromSql<SqlTypeOf<repository>, __DB>, Option<NaiveDateTime>: FromSql<SqlTypeOf<start_date>, __DB> + FromSql<SqlTypeOf<end_date>, __DB> + FromSql<SqlTypeOf<updt>, __DB>, Option<Uuid>: FromSql<SqlTypeOf<updu>, __DB> + FromSql<SqlTypeOf<chat>, __DB> + FromSql<SqlTypeOf<social_group>, __DB> + FromSql<SqlTypeOf<group_id>, __DB> + FromSql<SqlTypeOf<available_below>, __DB> + FromSql<SqlTypeOf<organization>, __DB>, Option<RStatus>: FromSql<SqlTypeOf<rstatus>, __DB>, RegistrationStatus: FromSql<SqlTypeOf<registration_status>, __DB>, Option<f64>: FromSql<SqlTypeOf<latitude>, __DB> + FromSql<SqlTypeOf<longitude>, __DB>, Json<Details>: FromSql<SqlTypeOf<details>, __DB>, bool: FromSql<SqlTypeOf<searchable>, __DB> + FromSql<SqlTypeOf<is_public>, __DB>, Option<Vec<i32>>: FromSql<SqlTypeOf<years_of_study>, __DB>, InteractionType: FromSql<SqlTypeOf<interaction_type>, __DB>, RegistrationType: FromSql<SqlTypeOf<registration_type>, __DB>, Option<Json<Vec<Milestone>>>: FromSql<SqlTypeOf<milestone>, __DB>,

§

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

Construct an instance of Self from the database row
§

impl Serialize for Project

§

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 Project

§

impl<'insert> UndecoratedInsertRecord<table> for Project

Auto Trait Implementations§

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<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,