#[non_exhaustive]pub enum WidgetStyle {
Shield,
Banner1,
Banner2,
Banner3,
Banner4,
Unknown(CompactString),
}Expand description
The style of a widget image
(GET /guilds/{guild.id}/widget.png?style=).
discord.js counterpart: GuildWidgetStyle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Shield
A shield with the Discord icon and the online member count.
Banner1
A large image with the guild icon, name and online count, “POWERED BY DISCORD” below.
Banner2
A smaller image with the guild icon, name and online count, the Discord logo on the right.
Banner3
A large image with the guild icon, name and online count, with a “Chat Now” button.
Banner4
A large Discord logo with the guild icon, name and online count, and a large “JOIN MY SERVER” button.
Unknown(CompactString)
A value that this version of the library does not know about.
Discord may add new values at any time. They are preserved here so that no
information is lost and deserialization never fails because of them. Prefer
WidgetStyle::from over constructing this variant directly.
Implementations§
Source§impl WidgetStyle
impl WidgetStyle
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the string Discord uses for this value.
discord.js counterpart: the enum’s string value in discord-api-types.
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true for a value this version of the library does not know about.
discord.js counterpart: none (discord.js passes unknown strings through).
Trait Implementations§
Source§impl AsRef<str> for WidgetStyle
impl AsRef<str> for WidgetStyle
Source§impl Clone for WidgetStyle
impl Clone for WidgetStyle
Source§impl Debug for WidgetStyle
impl Debug for WidgetStyle
Source§impl<'de> Deserialize<'de> for WidgetStyle
impl<'de> Deserialize<'de> for WidgetStyle
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for WidgetStyle
impl Display for WidgetStyle
impl Eq for WidgetStyle
Source§impl From<&str> for WidgetStyle
impl From<&str> for WidgetStyle
Source§impl Hash for WidgetStyle
impl Hash for WidgetStyle
Source§impl Ord for WidgetStyle
impl Ord for WidgetStyle
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WidgetStyle
impl PartialEq for WidgetStyle
Auto Trait Implementations§
impl Forget for WidgetStyle
impl Freeze for WidgetStyle
impl Move for WidgetStyle
impl RefUnwindSafe for WidgetStyle
impl Send for WidgetStyle
impl Sync for WidgetStyle
impl Unpin for WidgetStyle
impl UnsafeUnpin for WidgetStyle
impl UnwindSafe for WidgetStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more