Struct twilight_http::request::user::UpdateCurrentUser
source · pub struct UpdateCurrentUser<'a> { /* private fields */ }
Expand description
Update the current user.
All parameters are optional. If the username is changed, it may cause the discriminator to be randomized.
Implementations§
source§impl<'a> UpdateCurrentUser<'a>
impl<'a> UpdateCurrentUser<'a>
sourcepub const fn avatar(self, avatar: Option<&'a str>) -> Self
pub const fn avatar(self, avatar: Option<&'a str>) -> Self
Set the user’s avatar.
This must be a Data URI, in the form of
data:image/{type};base64,{data}
where {type}
is the image MIME type
and {data}
is the base64-encoded image. See Discord Docs/Image Data.
sourcepub fn username(self, username: &'a str) -> Result<Self, ValidationError>
pub fn username(self, username: &'a str) -> Result<Self, ValidationError>
Trait Implementations§
source§impl<'a> AuditLogReason<'a> for UpdateCurrentUser<'a>
impl<'a> AuditLogReason<'a> for UpdateCurrentUser<'a>
source§impl IntoFuture for UpdateCurrentUser<'_>
impl IntoFuture for UpdateCurrentUser<'_>
§type IntoFuture = ResponseFuture<User>
type IntoFuture = ResponseFuture<User>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more