#[non_exhaustive]pub struct SoundboardSound {
pub name: CompactString,
pub sound_id: SoundboardSoundId,
pub volume: f64,
pub emoji_id: Option<EmojiId>,
pub emoji_name: Option<CompactString>,
pub guild_id: Option<GuildId>,
pub available: bool,
pub user: Option<Box<User>>,
}Expand description
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: CompactStringThe sound’s name.
sound_id: SoundboardSoundIdThe sound’s ID.
volume: f64The volume, from 0 to 1.
emoji_id: Option<EmojiId>The sound’s custom emoji.
emoji_name: Option<CompactString>The sound’s standard (Unicode) emoji.
guild_id: Option<GuildId>The guild the sound belongs to (absent for default sounds).
available: boolWhether the sound can be used (false e.g. after the guild lost Server Boosts).
user: Option<Box<User>>The user who uploaded the sound (with the CREATE_GUILD_EXPRESSIONS or
MANAGE_GUILD_EXPRESSIONS permission).
Trait Implementations§
Source§impl Clone for SoundboardSound
impl Clone for SoundboardSound
Source§impl Debug for SoundboardSound
impl Debug for SoundboardSound
Source§impl<'de> Deserialize<'de> for SoundboardSound
impl<'de> Deserialize<'de> for SoundboardSound
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
Source§impl From<GuildSoundboardSoundCreate> for SoundboardSound
impl From<GuildSoundboardSoundCreate> for SoundboardSound
Source§fn from(event: GuildSoundboardSoundCreate) -> Self
fn from(event: GuildSoundboardSoundCreate) -> Self
Converts to this type from the input type.
Source§impl From<GuildSoundboardSoundUpdate> for SoundboardSound
impl From<GuildSoundboardSoundUpdate> for SoundboardSound
Source§fn from(event: GuildSoundboardSoundUpdate) -> Self
fn from(event: GuildSoundboardSoundUpdate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SoundboardSound
impl PartialEq for SoundboardSound
Source§impl Serialize for SoundboardSound
impl Serialize for SoundboardSound
impl StructuralPartialEq for SoundboardSound
Auto Trait Implementations§
impl Forget for SoundboardSound
impl Freeze for SoundboardSound
impl Move for SoundboardSound
impl RefUnwindSafe for SoundboardSound
impl Send for SoundboardSound
impl Sync for SoundboardSound
impl Unpin for SoundboardSound
impl UnsafeUnpin for SoundboardSound
impl UnwindSafe for SoundboardSound
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