pub struct UserProfile(/* private fields */);Expand description
All the profile information for a user.
Implementations§
Source§impl UserProfile
impl UserProfile
Sourcepub fn get(&self, field: &str) -> Option<&JsonValue>
pub fn get(&self, field: &str) -> Option<&JsonValue>
Returns the value of the given profile field.
Sourcepub fn get_static<F: StaticProfileField>(
&self,
) -> Result<Option<F::Value>, Error>
pub fn get_static<F: StaticProfileField>( &self, ) -> Result<Option<F::Value>, Error>
Returns the value of the given StaticProfileField.
Returns Ok(Some(_)) if the field is present and the value was deserialized
successfully, Ok(None) if the field is not set, or an error if deserialization of the
value failed.
Trait Implementations§
Source§impl Clone for UserProfile
impl Clone for UserProfile
Source§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserProfile
impl Debug for UserProfile
Source§impl Default for UserProfile
impl Default for UserProfile
Source§fn default() -> UserProfile
fn default() -> UserProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UserProfile
impl<'de> Deserialize<'de> for UserProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Extend<(ProfileFieldName, Value)> for UserProfile
impl Extend<(ProfileFieldName, Value)> for UserProfile
Source§fn extend<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<(String, Value)> for UserProfile
impl Extend<(String, Value)> for UserProfile
Source§fn extend<T: IntoIterator<Item = (String, JsonValue)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (String, JsonValue)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<ProfileFieldValue> for UserProfile
impl Extend<ProfileFieldValue> for UserProfile
Source§fn extend<T: IntoIterator<Item = ProfileFieldValue>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = ProfileFieldValue>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<(ProfileFieldName, Value)> for UserProfile
impl FromIterator<(ProfileFieldName, Value)> for UserProfile
Source§fn from_iter<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>( iter: T, ) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<(String, Value)> for UserProfile
impl FromIterator<(String, Value)> for UserProfile
Source§impl FromIterator<ProfileFieldValue> for UserProfile
impl FromIterator<ProfileFieldValue> for UserProfile
Source§fn from_iter<T: IntoIterator<Item = ProfileFieldValue>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ProfileFieldValue>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for UserProfile
impl IntoIterator for UserProfile
Auto Trait Implementations§
impl Freeze for UserProfile
impl RefUnwindSafe for UserProfile
impl Send for UserProfile
impl Sync for UserProfile
impl Unpin for UserProfile
impl UnsafeUnpin for UserProfile
impl UnwindSafe for UserProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more