Struct contack::sql::contact_information::SqlContactInformation [−][src]
pub struct SqlContactInformation {
pub pid: String,
pub pref: i16,
pub value: String,
pub platform: ContactPlatform,
pub typ: Option<Type>,
pub uid: String,
}
sql
only.Expand description
Represents contact information as it should appear in sql.
Fields
pid: String
The pid, used for representing this. Should be unique.
pref: i16
The Preference Value
value: String
The Value (for example johndoe@example.com)
platform: ContactPlatform
The platform which this is on
typ: Option<Type>
The type
uid: String
The UUID of the associated contact.
Implementations
Empties contact information from a contact.
Extracts, by means of emptying the contact information in a contact,
the contact information so that it can be used by diesel. Later,
use insert_contact_information
to replace it back.
This does involve cloning, as the UUID of the contact must be cloned for these structs to work :/.
Converts a normal ContactInformation
into a SqlContactInformation
Add contact information to a contact based of a vec of
ContactInformation
.
Trait Implementations
The update statement this type represents
Convert self
into the actual update statement being executed
The update statement this type represents
Convert self
into the actual update statement being executed
Performs the conversion.
impl<'a, R: Row> FromRow<'a, R> for SqlContactInformation where
&'a str: ColumnIndex<R>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
i16: Decode<'a, R::Database>,
i16: Type<R::Database>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
ContactPlatform: Decode<'a, R::Database>,
ContactPlatform: Type<R::Database>,
Option<Type>: Decode<'a, R::Database>,
Option<Type>: Type<R::Database>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for SqlContactInformation where
&'a str: ColumnIndex<R>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
i16: Decode<'a, R::Database>,
i16: Type<R::Database>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
ContactPlatform: Decode<'a, R::Database>,
ContactPlatform: Type<R::Database>,
Option<Type>: Decode<'a, R::Database>,
Option<Type>: Type<R::Database>,
String: Decode<'a, R::Database>,
String: Type<R::Database>,
Auto Trait Implementations
impl RefUnwindSafe for SqlContactInformation
impl Send for SqlContactInformation
impl Sync for SqlContactInformation
impl Unpin for SqlContactInformation
impl UnwindSafe for SqlContactInformation
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
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