Struct got_ya_id::apps::profiles::models::NewProfile[][src]

pub struct NewProfile<'a> { /* fields omitted */ }

Holds a new User Profile Record

Implementations

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

pub fn create<'b>(
    user_id: i32,
    profile: Option<u32>
) -> Result<Option<(Profile<'b>, Avatar<'b>)>, String>
[src]

Creates a new Profile associated with the user of the given ID.

Arguments

  • user_id: u32 ID of the user to associate with this profile
  • profile: Option If Some returns the created user Profile object. None(default): Nothing is returned

Trait Implementations

impl<'a> Default for NewProfile<'a>[src]

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

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

type Values = <(Option<Eq<user_id, i32>>, Option<Eq<phone, Cow<'a, str>>>, Option<Eq<name, Cow<'a, str>>>, Option<Eq<institution, Cow<'a, str>>>, Option<Eq<about, Cow<'a, str>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

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

type Values = <(Option<Eq<user_id, &'insert i32>>, Option<Eq<phone, &'insert Cow<'a, str>>>, Option<Eq<name, &'insert Cow<'a, str>>>, Option<Eq<institution, &'insert Cow<'a, str>>>, Option<Eq<about, &'insert Cow<'a, str>>>) as Insertable<table>>::Values

The VALUES clause to insert these records Read more

impl<'a> Serialize for NewProfile<'a>[src]

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for NewProfile<'a>

impl<'a> Send for NewProfile<'a>

impl<'a> Sync for NewProfile<'a>

impl<'a> Unpin for NewProfile<'a>

impl<'a> UnwindSafe for NewProfile<'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>,