pub struct Update {
pub role_id: RoleId,
pub name: Patch<String>,
pub color: Patch<u32>,
pub hoist: Patch<bool>,
pub mentionable: Patch<bool>,
pub permissions: Patch<Permissions>,
}Expand description
role.update (§8.4): any of the role.create fields.
SPEC: “any of the fields above” is read as the role.create fields (positions change
only through role.reorder).
Fields§
§role_id: RoleIdThe role.
name: Patch<String>New name.
color: Patch<u32>New colour; null clears.
hoist: Patch<bool>New hoist flag.
mentionable: Patch<bool>New mentionable flag.
permissions: Patch<Permissions>New permission set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Update
impl<'de> Deserialize<'de> for Update
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
impl Eq for Update
impl StructuralPartialEq for Update
Source§impl Validate for Update
impl Validate for Update
Source§fn validate(&self) -> Result<(), BodyError>
fn validate(&self) -> Result<(), BodyError>
SPEC: unknown bits already on a role may pass through unchanged (permissions §1.2),
so permissions is not checked for unknown bits here; the engine compares with the
stored value. @everyone may change only permissions (§8.4): any other field is
a bad request.
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnsafeUnpin for Update
impl UnwindSafe for Update
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