#[non_exhaustive]pub struct CreateStageInstance {
pub channel_id: ChannelId,
pub topic: CompactString,
pub privacy_level: Option<PrivacyLevel>,
pub send_start_notification: Option<bool>,
pub guild_scheduled_event_id: Option<ScheduledEventId>,
}Expand description
The body of Create Stage Instance.
discord.js counterpart: StageInstanceCreateOptions.
§Examples
use djs_model::{id::ChannelId, rest::CreateStageInstance};
let mut body = CreateStageInstance::new(ChannelId::new(1_200_000_000_000_000_005), "Q&A");
body.send_start_notification = Some(true);
assert_eq!(
serde_json::to_string(&body)?,
r#"{"channel_id":"1200000000000000005","topic":"Q&A","send_start_notification":true}"#
);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.channel_id: ChannelIdThe stage channel.
topic: CompactStringThe topic (1-120 characters).
privacy_level: Option<PrivacyLevel>Who can see the stage (Discord’s default: PrivacyLevel::GuildOnly; Public is
deprecated).
send_start_notification: Option<bool>Whether to notify @everyone that the stage started (the bot needs
MENTION_EVERYONE).
guild_scheduled_event_id: Option<ScheduledEventId>The scheduled event the stage belongs to.
Implementations§
Trait Implementations§
Source§impl Clone for CreateStageInstance
impl Clone for CreateStageInstance
Source§impl Debug for CreateStageInstance
impl Debug for CreateStageInstance
impl Eq for CreateStageInstance
Source§impl Hash for CreateStageInstance
impl Hash for CreateStageInstance
Source§impl PartialEq for CreateStageInstance
impl PartialEq for CreateStageInstance
Source§impl Serialize for CreateStageInstance
impl Serialize for CreateStageInstance
impl StructuralPartialEq for CreateStageInstance
Auto Trait Implementations§
impl Freeze for CreateStageInstance
impl RefUnwindSafe for CreateStageInstance
impl Send for CreateStageInstance
impl Sync for CreateStageInstance
impl Unpin for CreateStageInstance
impl UnsafeUnpin for CreateStageInstance
impl UnwindSafe for CreateStageInstance
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