#[non_exhaustive]pub struct ModifyGuildSoundboardSound {
pub name: Option<CompactString>,
pub volume: Patch<f64>,
pub emoji_id: Patch<EmojiId>,
pub emoji_name: Patch<CompactString>,
}Expand description
The body of Modify Guild Soundboard Sound.
Every field is optional; the sound itself cannot be changed. Patch fields can be
cleared.
discord.js counterpart: GuildSoundboardSoundEditOptions.
§Examples
use djs_model::{rest::ModifyGuildSoundboardSound, util::Patch};
let mut body = ModifyGuildSoundboardSound::default();
body.volume = Patch::Set(0.25);
body.emoji_name = Patch::Clear;
assert_eq!(serde_json::to_string(&body)?, r#"{"volume":0.25,"emoji_name":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 (2–32 characters).
volume: Patch<f64>The volume, from 0 to 1.
emoji_id: Patch<EmojiId>A custom emoji shown with the sound.
emoji_name: Patch<CompactString>A Unicode emoji shown with the sound.
Trait Implementations§
Source§impl Clone for ModifyGuildSoundboardSound
impl Clone for ModifyGuildSoundboardSound
Source§impl Debug for ModifyGuildSoundboardSound
impl Debug for ModifyGuildSoundboardSound
Source§impl Default for ModifyGuildSoundboardSound
impl Default for ModifyGuildSoundboardSound
impl StructuralPartialEq for ModifyGuildSoundboardSound
Auto Trait Implementations§
impl Forget for ModifyGuildSoundboardSound
impl Freeze for ModifyGuildSoundboardSound
impl Move for ModifyGuildSoundboardSound
impl RefUnwindSafe for ModifyGuildSoundboardSound
impl Send for ModifyGuildSoundboardSound
impl Sync for ModifyGuildSoundboardSound
impl Unpin for ModifyGuildSoundboardSound
impl UnsafeUnpin for ModifyGuildSoundboardSound
impl UnwindSafe for ModifyGuildSoundboardSound
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