Struct sparkle_cache::model::CachedChannel
source · [−]pub struct CachedChannel {Show 24 fields
pub application_id: Option<Id<ApplicationMarker>>,
pub bitrate: Option<u32>,
pub default_auto_archive_duration: Option<AutoArchiveDuration>,
pub guild_id: Option<Id<GuildMarker>>,
pub icon: Option<ImageHash>,
pub id: Id<ChannelMarker>,
pub invitable: Option<bool>,
pub kind: ChannelType,
pub name: Option<String>,
pub nsfw: Option<bool>,
pub owner_id: Option<Id<UserMarker>>,
pub parent_id: Option<Id<ChannelMarker>>,
pub position: Option<i32>,
pub rate_limit_per_user: Option<u16>,
pub rtc_region: Option<String>,
pub thread_archived: Option<bool>,
pub thread_auto_archive_duration: Option<AutoArchiveDuration>,
pub thread_archive_timestamp: Option<Timestamp>,
pub thread_create_timestamp: Option<Timestamp>,
pub thread_invitable: Option<bool>,
pub thread_locked: Option<bool>,
pub topic: Option<String>,
pub user_limit: Option<u32>,
pub video_quality_mode: Option<VideoQualityMode>,
}Expand description
A cached channel
It’s the same as twilight_model::channel::Channel except:
-
recipientsfield is removed, as it’s only sent in DM channels, which are cached separately -
permission_overwritesfield is removed, as they’re cached separately -
last_message_id,last_pin_timestamp,member_countandmessage_countfields are removed, as keeping them up-to-date would add unnecessary caching overhead -
memberandnewly_createdfields are removed, as they’re only sent in some HTTP endpoints -
thread_metadatafield is flattened, making this struct easier to cache
Fields
application_id: Option<Id<ApplicationMarker>>bitrate: Option<u32>default_auto_archive_duration: Option<AutoArchiveDuration>guild_id: Option<Id<GuildMarker>>icon: Option<ImageHash>id: Id<ChannelMarker>invitable: Option<bool>kind: ChannelTypename: Option<String>nsfw: Option<bool>owner_id: Option<Id<UserMarker>>parent_id: Option<Id<ChannelMarker>>position: Option<i32>rate_limit_per_user: Option<u16>rtc_region: Option<String>thread_archived: Option<bool>thread_auto_archive_duration: Option<AutoArchiveDuration>thread_archive_timestamp: Option<Timestamp>thread_create_timestamp: Option<Timestamp>thread_invitable: Option<bool>thread_locked: Option<bool>topic: Option<String>user_limit: Option<u32>video_quality_mode: Option<VideoQualityMode>Trait Implementations
sourceimpl Clone for CachedChannel
impl Clone for CachedChannel
sourcefn clone(&self) -> CachedChannel
fn clone(&self) -> CachedChannel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CachedChannel
impl Debug for CachedChannel
Auto Trait Implementations
impl RefUnwindSafe for CachedChannel
impl Send for CachedChannel
impl Sync for CachedChannel
impl Unpin for CachedChannel
impl UnwindSafe for CachedChannel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more