Struct got_ya_id::apps::email::models::NewEmail[][src]

pub struct NewEmail<'a> {
    pub user_id: i32,
    pub email: Cow<'a, str>,
    pub active: bool,
    pub removed: bool,
    pub verified: bool,
}

Holds new email data

Fields

user_id: i32email: Cow<'a, str>active: boolremoved: boolverified: bool

Implementations

impl<'a> NewEmail<'a>[src]

pub fn save(&self) -> Result<Email, ResError>[src]

Saves a new email to the Database

Trait Implementations

impl<'de, 'a> Deserialize<'de> for NewEmail<'a>[src]

impl<'a, 'insert> Insertable<table> for NewEmail<'a>[src]

type Values = <(Option<Eq<user_id, i32>>, Option<Eq<email, Cow<'a, str>>>, Option<Eq<active, bool>>, Option<Eq<removed, bool>>, Option<Eq<verified, bool>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

impl<'a, 'insert> Insertable<table> for &'insert NewEmail<'a>[src]

type Values = <(Option<Eq<user_id, &'insert i32>>, Option<Eq<email, &'insert Cow<'a, str>>>, Option<Eq<active, &'insert bool>>, Option<Eq<removed, &'insert bool>>, Option<Eq<verified, &'insert bool>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

impl<'a, 'insert> UndecoratedInsertRecord<table> for NewEmail<'a>[src]

impl<'a> Validate for NewEmail<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for NewEmail<'a>

impl<'a> Send for NewEmail<'a>

impl<'a> Sync for NewEmail<'a>

impl<'a> Unpin for NewEmail<'a>

impl<'a> UnwindSafe for NewEmail<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T> FromPy<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoPy<U> for T where
    U: FromPy<T>, 
[src]

impl<T> IntoSql for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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