#[non_exhaustive]pub struct UpdateApplicationIdentityProfile {
pub username: Option<CompactString>,
pub data: Option<ProfileData>,
}Expand description
The body of Update Application Identity Profile.
Every field is optional. data replaces the stored stats as a whole, so send
all of them every time.
Contains floats, so it is PartialEq but not Eq (D-064).
discord.js counterpart: RESTPatchAPIApplicationIdentityProfileJSONBody (discord-api-types).
§Examples
use djs_model::rest::UpdateApplicationIdentityProfile;
let mut body = UpdateApplicationIdentityProfile::default();
body.username = Some("ferris#1".into());
assert_eq!(serde_json::to_string(&body)?, r#"{"username":"ferris#1"}"#);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.username: Option<CompactString>The user’s username in the app’s system (up to 1024 characters).
data: Option<ProfileData>The complete game stats (at most 10 KB serialized, up to 30 dynamic fields).
Trait Implementations§
impl StructuralPartialEq for UpdateApplicationIdentityProfile
Auto Trait Implementations§
impl Forget for UpdateApplicationIdentityProfile
impl Freeze for UpdateApplicationIdentityProfile
impl Move for UpdateApplicationIdentityProfile
impl RefUnwindSafe for UpdateApplicationIdentityProfile
impl Send for UpdateApplicationIdentityProfile
impl Sync for UpdateApplicationIdentityProfile
impl Unpin for UpdateApplicationIdentityProfile
impl UnsafeUnpin for UpdateApplicationIdentityProfile
impl UnwindSafe for UpdateApplicationIdentityProfile
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