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]
user_id: i32,
profile: Option<u32>
) -> Result<Option<(Profile<'b>, Avatar<'b>)>, String>
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]
fn default() -> NewProfile<'a>
[src]
impl<'de, 'a> Deserialize<'de> for NewProfile<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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
fn values(self) -> Self::Values
[src]
pub fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
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
fn values(self) -> Self::Values
[src]
pub fn insert_into(
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
[src]
self,
table: T
) -> InsertStatement<T, Self::Values, Insert, NoReturningClause>
impl<'a> Serialize for NewProfile<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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]
U: From<T>,
impl<T, U> IntoPy<U> for T where
U: FromPy<T>,
[src]
U: FromPy<T>,
impl<T> IntoSql for T
[src]
pub fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
pub fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,