shared::domain::user

Struct CreateProfileRequest

Source
pub struct CreateProfileRequest {
Show 16 fields pub username: String, pub over_18: bool, pub given_name: String, pub family_name: String, pub profile_image_url: Option<String>, pub language_app: String, pub language_emails: String, pub languages_spoken: Vec<String>, pub timezone: Tz, pub opt_into_edu_resources: bool, pub organization: Option<String>, pub persona: Vec<String>, pub subjects: Vec<SubjectId>, pub age_ranges: Vec<AgeRangeId>, pub affiliations: Vec<AffiliationId>, pub location: Option<Value>,
}
Expand description

Fields§

§username: String

The user’s username.

This must be unique.

§over_18: bool

Is the user >= 18 yeas old?

§given_name: String

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

§family_name: String

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

§profile_image_url: Option<String>

URL to the user’s profile image. The API server uploads and processes the image so that the profile image is stored in Cloud Storage in the user image library.

§language_app: String

The user’s preferred application language.

§language_emails: String

The user’s preferred email language.

§languages_spoken: Vec<String>

The user’s preferred language.

§timezone: Tz

the timezone that the user uses.

§opt_into_edu_resources: bool

Does the user want educational resources sent to them?

§organization: Option<String>

The organization that the user belongs to.

§persona: Vec<String>

The persona of the user

§subjects: Vec<SubjectId>

The user’s taught subjects.

§age_ranges: Vec<AgeRangeId>

The user’s age-ranges.

§affiliations: Vec<AffiliationId>

The user’s affiliations.

§location: Option<Value>

The user’s location

Trait Implementations§

Source§

impl Debug for CreateProfileRequest

Source§

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

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

impl<'de> Deserialize<'de> for CreateProfileRequest

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 CreateProfileRequest

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