shared::domain::user

Struct PatchProfileRequest

Source
pub struct PatchProfileRequest {
Show 21 fields pub username: Option<String>, pub given_name: Option<String>, pub family_name: Option<String>, pub profile_image: Option<Option<ImageId>>, pub bio: Option<String>, pub language_app: Option<String>, pub language_emails: Option<String>, pub languages_spoken: Option<Vec<String>>, pub timezone: Option<Tz>, pub opt_into_edu_resources: Option<bool>, pub organization_public: Option<bool>, pub persona_public: Option<bool>, pub languages_spoken_public: Option<bool>, pub location_public: Option<bool>, pub bio_public: Option<bool>, pub organization: Option<Option<String>>, pub persona: Option<Vec<String>>, pub subjects: Option<Vec<SubjectId>>, pub age_ranges: Option<Vec<AgeRangeId>>, pub affiliations: Option<Vec<AffiliationId>>, pub location: Option<Option<Value>>,
}
Expand description

Request for PatchProfile

Fields§

§username: Option<String>

The user’s username.

This must be unique.

§given_name: Option<String>

The user’s given name / “first name”.

§family_name: Option<String>

The user’s family name / “last name”.

§profile_image: Option<Option<ImageId>>

ID to the user’s profile image in the user image library.

§bio: Option<String>

The user’s bio

§language_app: Option<String>

the language the user prefers the application to be in.

§language_emails: Option<String>

the language the user prefers emails to be in.

§languages_spoken: Option<Vec<String>>

the languages the user prefers.

§timezone: Option<Tz>

the timezone that the user uses.

§opt_into_edu_resources: Option<bool>

Does the user want educational resources sent to them?

§organization_public: Option<bool>

Publicize Users organization

§persona_public: Option<bool>

Publicize user persona

§languages_spoken_public: Option<bool>

Publicize user lanuage

§location_public: Option<bool>

Publicize user location

§bio_public: Option<bool>

Publicize user bio

§organization: Option<Option<String>>

The organization that the user belongs to.

Field is updated if Some(_) with the inner contents.

§persona: Option<Vec<String>>

The persona of the user.

Field is updated if Some(_) with the inner contents.

§subjects: Option<Vec<SubjectId>>

The user’s taught subjects.

If Some, replace the existing SubjectIds with this.

§age_ranges: Option<Vec<AgeRangeId>>

The user’s age-ranges.

If Some, replace the existing AgeRangeIds with this.

§affiliations: Option<Vec<AffiliationId>>

The user’s affiliations.

If Some, replace the existing AffiliationIds with this.

§location: Option<Option<Value>>

The user’s location.

  • If the outer Option is None, then no update is done,
  • If Some(None), sets the location to None,
  • If Some(Some(_)), updates the user location to Some(_).

Trait Implementations§

Source§

impl Debug for PatchProfileRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PatchProfileRequest

Source§

fn default() -> PatchProfileRequest

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PatchProfileRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PatchProfileRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T