pub trait CacheableChannel:
From<Channel>
+ PartialEq<Channel>
+ PartialEq<Self>
+ Clone
+ Debug {
// Required methods
fn guild_id(&self) -> Option<Id<GuildMarker>>;
fn kind(&self) -> ChannelType;
fn parent_id(&self) -> Option<Id<ChannelMarker>>;
fn id(&self) -> Id<ChannelMarker>;
fn permission_overwrites(&self) -> Option<&[PermissionOverwrite]>;
fn set_last_pin_timestamp(&mut self, timestamp: Option<Timestamp>);
}Expand description
Trait for a generic cached representation of a [Channel].
Required Methods§
Sourcefn parent_id(&self) -> Option<Id<ChannelMarker>>
Available on crate feature permission-calculator only.
fn parent_id(&self) -> Option<Id<ChannelMarker>>
permission-calculator only.ID of the parent channel if this is a thread.
Sourcefn permission_overwrites(&self) -> Option<&[PermissionOverwrite]>
Available on crate feature permission-calculator only.
fn permission_overwrites(&self) -> Option<&[PermissionOverwrite]>
permission-calculator only.Permission overwrites for the channel.
Sourcefn set_last_pin_timestamp(&mut self, timestamp: Option<Timestamp>)
fn set_last_pin_timestamp(&mut self, timestamp: Option<Timestamp>)
Set the last pin timestamp to a new timestamp.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl CacheableChannel for Channel
impl CacheableChannel for Channel
fn guild_id(&self) -> Option<Id<GuildMarker>>
fn kind(&self) -> ChannelType
Source§fn parent_id(&self) -> Option<Id<ChannelMarker>>
fn parent_id(&self) -> Option<Id<ChannelMarker>>
Available on crate feature
permission-calculator only.fn id(&self) -> Id<ChannelMarker>
Source§fn permission_overwrites(&self) -> Option<&[PermissionOverwrite]>
fn permission_overwrites(&self) -> Option<&[PermissionOverwrite]>
Available on crate feature
permission-calculator only.