pub trait UserExt: Identifiable {
// 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;
fn avatar_url(&self, http: impl AsRef<HttpClient> + Send) -> String;
fn default_avatar_url(&self, http: impl AsRef<HttpClient> + Send) -> String;
}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,
fn avatar_url(&self, http: impl AsRef<HttpClient> + Send) -> String
fn default_avatar_url(&self, http: impl AsRef<HttpClient> + Send) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".