PermissionQuery

Trait PermissionQuery 

Source
pub trait PermissionQuery {
Show 18 methods // Required methods fn are_we_privileged<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_we_a_bot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_the_users_same<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_relationship<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = RelationshipStatus> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_is_bot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn have_mutual_connection<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_we_server_owner<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_we_a_member<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_default_server_permissions<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_our_server_role_overrides<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Vec<Override>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_we_timed_out<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_channel_type<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ChannelType> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_default_channel_permissions<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Override> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_our_channel_role_overrides<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Vec<Override>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn do_we_own_the_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn are_we_part_of_the_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_recipient_as_user<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_server_from_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

Source

fn are_we_privileged<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user privileged?

Source

fn are_we_a_bot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user a bot?

Source

fn are_the_users_same<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user and the currently selected user the same?

Source

fn user_relationship<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = RelationshipStatus> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the relationship with have with the currently selected user

Source

fn user_is_bot<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Whether the currently selected user is a bot

Source

fn have_mutual_connection<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Do we have a mutual connection with the currently selected user?

Source

fn are_we_server_owner<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user the server’s owner?

Source

fn are_we_a_member<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user a member of the server?

Source

fn get_default_server_permissions<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get default server permission

Source

fn get_our_server_role_overrides<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Vec<Override>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the ordered role overrides (from lowest to highest) for this member in this server

Source

fn are_we_timed_out<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Is our perspective user timed out on this server?

Source

fn get_channel_type<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ChannelType> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the type of the channel

Source

fn get_default_channel_permissions<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Override> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the default channel permissions Group channel defaults should be mapped to an allow-only override

Source

fn get_our_channel_role_overrides<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Vec<Override>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the ordered role overrides (from lowest to highest) for this member in this channel

Source

fn do_we_own_the_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Do we own this group or saved messages channel if it is one of those?

Source

fn are_we_part_of_the_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Are we a recipient of this channel?

Source

fn set_recipient_as_user<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the current user as the recipient of this channel (this will only ever be called for DirectMessage channels, use unimplemented!() for other code paths)

Source

fn set_server_from_channel<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the current server as the server owning this channel (this will only ever be called for server channels, use unimplemented!() for other code paths)

Implementors§