#[non_exhaustive]pub struct Widget {
pub id: GuildId,
pub name: CompactString,
pub instant_invite: Option<CompactString>,
pub channels: Vec<WidgetChannel>,
pub members: Vec<WidgetMember>,
pub presence_count: u32,
}Expand description
The public widget
of a guild (GET /guilds/{guild.id}/widget.json).
discord.js counterpart: Widget.
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.id: GuildIdThe guild’s ID.
name: CompactStringThe guild’s name.
instant_invite: Option<CompactString>An instant invite to the widget’s channel.
channels: Vec<WidgetChannel>The voice and stage channels everyone can access.
members: Vec<WidgetMember>Up to 100 online members, anonymized.
presence_count: u32The number of online members.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Widget
impl<'de> Deserialize<'de> for Widget
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
impl Eq for Widget
impl StructuralPartialEq for Widget
Auto Trait Implementations§
impl Forget for Widget
impl Freeze for Widget
impl Move for Widget
impl RefUnwindSafe for Widget
impl Send for Widget
impl Sync for Widget
impl Unpin for Widget
impl UnsafeUnpin for Widget
impl UnwindSafe for Widget
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