Skip to main content

UserExt

Trait UserExt 

Source
pub trait UserExt {
    // Required methods
    fn mention(&self) -> String;
    fn name(&self) -> &str;
    fn voice(
        &self,
        cache: impl AsRef<GlobalCache>,
    ) -> Vec<(String, UserVoiceState)>;
    fn send<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<SendMessageBuilder>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn edit<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
        data: &'life1 DataEditUser,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fetch_profile<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<UserProfile>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_flags<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<FlagResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_mutuals<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<MutualResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_default_avatar<'life0, 'async_trait>(
        &'life0 self,
        http: impl 'async_trait + AsRef<HttpClient> + Send,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn mention(&self) -> String

Source

fn name(&self) -> &str

Source

fn voice(&self, cache: impl AsRef<GlobalCache>) -> Vec<(String, UserVoiceState)>

Source

fn send<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<SendMessageBuilder>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn edit<'life0, 'life1, 'async_trait>( &'life0 mut self, http: impl 'async_trait + AsRef<HttpClient> + Send, data: &'life1 DataEditUser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_profile<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<UserProfile>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_flags<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<FlagResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_mutuals<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<MutualResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_default_avatar<'life0, 'async_trait>( &'life0 self, http: impl 'async_trait + AsRef<HttpClient> + Send, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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.

Implementors§