#[non_exhaustive]pub struct CreateGuildTemplate {
pub name: CompactString,
pub description: Option<CompactString>,
}Expand description
The body of Create Guild Template.
discord.js counterpart: the arguments of Guild#createTemplate.
§Examples
use djs_model::rest::CreateGuildTemplate;
let mut body = CreateGuildTemplate::new("Study group");
body.description = Some("Channels and roles for a study group".into());
assert_eq!(
serde_json::to_string(&body)?,
r#"{"name":"Study group","description":"Channels and roles for a study group"}"#
);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 name (1-100 characters).
description: Option<CompactString>The description (0-120 characters).
Implementations§
Trait Implementations§
Source§impl Clone for CreateGuildTemplate
impl Clone for CreateGuildTemplate
Source§impl Debug for CreateGuildTemplate
impl Debug for CreateGuildTemplate
impl Eq for CreateGuildTemplate
Source§impl Hash for CreateGuildTemplate
impl Hash for CreateGuildTemplate
Source§impl PartialEq for CreateGuildTemplate
impl PartialEq for CreateGuildTemplate
Source§impl Serialize for CreateGuildTemplate
impl Serialize for CreateGuildTemplate
impl StructuralPartialEq for CreateGuildTemplate
Auto Trait Implementations§
impl Freeze for CreateGuildTemplate
impl RefUnwindSafe for CreateGuildTemplate
impl Send for CreateGuildTemplate
impl Sync for CreateGuildTemplate
impl Unpin for CreateGuildTemplate
impl UnsafeUnpin for CreateGuildTemplate
impl UnwindSafe for CreateGuildTemplate
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