pub struct ContactInformation {
pub pid: String,
pub pref: u8,
pub value: String,
pub platform: ContactPlatform,
pub typ: Option<Type>,
}Expand description
Represents any way which a contact can be contacted.
This may be a phone number, an email etc. You can add
any number of them to a Contact.
Fields§
§pid: StringThe pid, used for representing this amongst
other ContactInformations.
pref: u8The Preference Value. In this implementation 0 represents that it is neutral, not either way.
value: StringThe Value (for example johndoe@example.com)
platform: ContactPlatformThe platform which this is on
typ: Option<Type>The type
Implementations§
Source§impl ContactInformation
impl ContactInformation
Sourcepub fn new(string: String, platform: ContactPlatform) -> Self
pub fn new(string: String, platform: ContactPlatform) -> Self
Creates a new ContactInformation
This also auto generates a pid between 0 and 100
Trait Implementations§
Source§impl Clone for ContactInformation
impl Clone for ContactInformation
Source§fn clone(&self) -> ContactInformation
fn clone(&self) -> ContactInformation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContactInformation
impl Debug for ContactInformation
Source§impl From<ContactInformation> for Component
impl From<ContactInformation> for Component
Source§fn from(ci: ContactInformation) -> Self
fn from(ci: ContactInformation) -> Self
Converts to this type from the input type.
Source§impl From<SqlContactInformation> for ContactInformation
Available on crate feature sql only.
impl From<SqlContactInformation> for ContactInformation
Available on crate feature
sql only.Source§fn from(ci: SqlContactInformation) -> Self
fn from(ci: SqlContactInformation) -> Self
Converts to this type from the input type.
Source§impl Ord for ContactInformation
impl Ord for ContactInformation
Source§fn cmp(&self, other: &ContactInformation) -> Ordering
fn cmp(&self, other: &ContactInformation) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ContactInformation
impl PartialEq for ContactInformation
Source§impl PartialOrd for ContactInformation
impl PartialOrd for ContactInformation
Source§impl TryFrom<Component> for ContactInformation
impl TryFrom<Component> for ContactInformation
impl Eq for ContactInformation
impl StructuralPartialEq for ContactInformation
Auto Trait Implementations§
impl Freeze for ContactInformation
impl RefUnwindSafe for ContactInformation
impl Send for ContactInformation
impl Sync for ContactInformation
impl Unpin for ContactInformation
impl UnwindSafe for ContactInformation
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> 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::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self to an expression for Diesel’s query builder. Read more