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,
}
This is supported on crate feature 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 table which Self::Changeset will be updating

The update statement this type represents

Convert self into the actual update statement being executed

The table which Self::Changeset will be updating

The update statement this type represents

Convert self into the actual update statement being executed

Performs the conversion.

The table this type is associated with.

Returns the table this type is associated with.

The type of this struct’s identifier. Read more

Returns the identifier for this record. Read more

The VALUES clause to insert these records Read more

Construct Self::Values Read more

Insert self into a given table. Read more

The VALUES clause to insert these records Read more

Construct Self::Values Read more

Insert self into a given table. Read more

The Rust type you’d like to map from. Read more

Construct an instance of this type

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.