#[non_exhaustive]pub struct InviteGuild {
pub id: GuildId,
pub name: String,
pub splash: Option<ImageHash>,
pub banner: Option<ImageHash>,
pub description: Option<String>,
pub icon: Option<ImageHash>,
pub features: Vec<String>,
pub verification_level: VerificationLevel,
pub vanity_url_code: Option<String>,
pub nsfw_level: NsfwLevel,
pub premium_subscription_count: Option<u64>,
}
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: GuildId
§name: String
§splash: Option<ImageHash>
§description: Option<String>
§icon: Option<ImageHash>
§features: Vec<String>
§verification_level: VerificationLevel
§vanity_url_code: Option<String>
§nsfw_level: NsfwLevel
Implementations§
Source§impl InviteGuild
impl InviteGuild
Sourcepub fn splash_url(&self) -> Option<String>
pub fn splash_url(&self) -> Option<String>
Returns the formatted URL of the guild’s splash image, if one exists.
Source§impl InviteGuild
impl InviteGuild
Sourcepub fn shard_id(&self, cache: impl AsRef<Cache>) -> u32
pub fn shard_id(&self, cache: impl AsRef<Cache>) -> u32
Returns the Id of the shard associated with the guild.
When the cache is enabled this will automatically retrieve the total number of shards.
Note: When the cache is enabled, this function unlocks the cache to retrieve the total
number of shards in use. If you already have the total, consider using utils::shard_id
.
Trait Implementations§
Source§impl Clone for InviteGuild
impl Clone for InviteGuild
Source§fn clone(&self) -> InviteGuild
fn clone(&self) -> InviteGuild
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InviteGuild
impl Debug for InviteGuild
Source§impl<'de> Deserialize<'de> for InviteGuild
impl<'de> Deserialize<'de> for InviteGuild
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<&InviteGuild> for GuildId
impl From<&InviteGuild> for GuildId
Source§fn from(invite_guild: &InviteGuild) -> GuildId
fn from(invite_guild: &InviteGuild) -> GuildId
Gets the Id of Invite Guild struct.
Source§impl From<InviteGuild> for GuildId
impl From<InviteGuild> for GuildId
Source§fn from(invite_guild: InviteGuild) -> GuildId
fn from(invite_guild: InviteGuild) -> GuildId
Gets the Id of Invite Guild struct.
Auto Trait Implementations§
impl Freeze for InviteGuild
impl RefUnwindSafe for InviteGuild
impl Send for InviteGuild
impl Sync for InviteGuild
impl Unpin for InviteGuild
impl UnwindSafe for InviteGuild
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