Struct UserProfile
pub struct UserProfile(/* private fields */);Available on crate feature
api and (crate features client or server) only.Expand description
All the profile information for a user.
Implementations§
§impl UserProfile
impl UserProfile
pub fn new() -> UserProfile
pub fn new() -> UserProfile
Creates a new empty UserProfile.
pub fn get_static<F>(
&self,
) -> Result<Option<<F as StaticProfileField>::Value>, Error>where
F: StaticProfileField,
pub fn get_static<F>(
&self,
) -> Result<Option<<F as StaticProfileField>::Value>, Error>where
F: StaticProfileField,
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.
pub fn merge(&mut self, profile_update: UserProfileUpdate)
Available on crate feature unstable-msc4262 only.
pub fn merge(&mut self, profile_update: UserProfileUpdate)
unstable-msc4262 only.Merges a profile that contains updates (such as from a sync response) with this profile.
This operation preserves omitted values and removes null values.
Trait Implementations§
§impl Clone for UserProfile
impl Clone for UserProfile
§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for UserProfile
impl Debug for UserProfile
§impl Default for UserProfile
impl Default for UserProfile
§fn default() -> UserProfile
fn default() -> UserProfile
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for UserProfile
impl<'de> Deserialize<'de> for UserProfile
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserProfile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserProfile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Extend<(ProfileFieldName, Value)> for UserProfile
impl Extend<(ProfileFieldName, Value)> for UserProfile
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
§impl Extend<(String, Value)> for UserProfile
impl Extend<(String, Value)> for UserProfile
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
§impl Extend<ProfileFieldValue> for UserProfile
impl Extend<ProfileFieldValue> for UserProfile
§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ProfileFieldValue>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ProfileFieldValue>,
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
§impl From<UserProfile> for Response
impl From<UserProfile> for Response
§fn from(value: UserProfile) -> Response
fn from(value: UserProfile) -> Response
Converts to this type from the input type.
§impl From<UserProfile> for Response
impl From<UserProfile> for Response
§fn from(value: UserProfile) -> Response
fn from(value: UserProfile) -> Response
Converts to this type from the input type.
§impl FromIterator<(ProfileFieldName, Value)> for UserProfile
impl FromIterator<(ProfileFieldName, Value)> for UserProfile
§fn from_iter<T>(iter: T) -> UserProfile
fn from_iter<T>(iter: T) -> UserProfile
Creates a value from an iterator. Read more
§impl FromIterator<(String, Value)> for UserProfile
impl FromIterator<(String, Value)> for UserProfile
§fn from_iter<T>(iter: T) -> UserProfile
fn from_iter<T>(iter: T) -> UserProfile
Creates a value from an iterator. Read more
§impl FromIterator<ProfileFieldValue> for UserProfile
impl FromIterator<ProfileFieldValue> for UserProfile
§fn from_iter<T>(iter: T) -> UserProfilewhere
T: IntoIterator<Item = ProfileFieldValue>,
fn from_iter<T>(iter: T) -> UserProfilewhere
T: IntoIterator<Item = ProfileFieldValue>,
Creates a value from an iterator. Read more
§impl IntoIterator for UserProfile
impl IntoIterator for UserProfile
§impl Serialize for UserProfile
impl Serialize for UserProfile
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read moreSource§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more