#[non_exhaustive]pub struct ModifyGuildEmoji {
pub name: Option<CompactString>,
pub roles: Patch<Vec<RoleId>>,
}Expand description
The body of Modify Guild Emoji.
Every field is optional; the image cannot be changed.
discord.js counterpart: GuildEmojiEditOptions.
§Examples
use djs_model::{rest::ModifyGuildEmoji, util::Patch};
let mut body = ModifyGuildEmoji::default();
body.name = Some("crab".into());
body.roles = Patch::Clear; // usable by everyone again
assert_eq!(serde_json::to_string(&body)?, r#"{"name":"crab","roles":null}"#);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.name: Option<CompactString>The new name.
roles: Patch<Vec<RoleId>>The roles allowed to use the emoji; Patch::Clear allows everyone.
Trait Implementations§
Source§impl Clone for ModifyGuildEmoji
impl Clone for ModifyGuildEmoji
Source§impl Debug for ModifyGuildEmoji
impl Debug for ModifyGuildEmoji
Source§impl Default for ModifyGuildEmoji
impl Default for ModifyGuildEmoji
impl Eq for ModifyGuildEmoji
Source§impl Hash for ModifyGuildEmoji
impl Hash for ModifyGuildEmoji
Source§impl PartialEq for ModifyGuildEmoji
impl PartialEq for ModifyGuildEmoji
Source§impl Serialize for ModifyGuildEmoji
impl Serialize for ModifyGuildEmoji
impl StructuralPartialEq for ModifyGuildEmoji
Auto Trait Implementations§
impl Freeze for ModifyGuildEmoji
impl RefUnwindSafe for ModifyGuildEmoji
impl Send for ModifyGuildEmoji
impl Sync for ModifyGuildEmoji
impl Unpin for ModifyGuildEmoji
impl UnsafeUnpin for ModifyGuildEmoji
impl UnwindSafe for ModifyGuildEmoji
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