pub trait ApiExt {
type Error;
Show 37 methods
// Required methods
fn send_private_message<'life0, 'async_trait, M>(
&'life0 self,
user_id: i64,
message: M,
auto_escape: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, Self::Error>> + Send + 'async_trait>>
where M: IntoMessage + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn send_group_message<'life0, 'async_trait, M>(
&'life0 self,
group_id: i64,
message: M,
auto_escape: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, Self::Error>> + Send + 'async_trait>>
where M: IntoMessage + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn delete_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<GetMessageResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_forward_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<GetForwardResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_like<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
times: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_kick<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
reject_add_request: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_anonymous_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
anonymous: Option<GroupAnonymousInfo>,
flag: Option<String>,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_whole_group_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_admin<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_anonymous<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_card<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
card: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_name<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
group_name: String,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_leave<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
is_dismiss: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_special_title<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
special_title: Option<String>,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_friend_add_request<'life0, 'async_trait>(
&'life0 self,
flag: String,
approve: Option<bool>,
remark: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_group_add_request<'life0, 'async_trait>(
&'life0 self,
flag: String,
sub_type: GroupRequestSubType,
approve: Option<bool>,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_login_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<LoginInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stranger_info<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<StrangerInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_friend_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<FriendInfo>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_group_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<GroupInfoResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_group_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<GroupInfoResponse>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_group_member_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<GroupInfoResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_group_member_list<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<FriendInfo>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_group_honor_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
ty: GroupHonorType,
) -> Pin<Box<dyn Future<Output = Result<GroupHonorInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_cookies<'life0, 'async_trait>(
&'life0 self,
domain: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<GetCookiesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_csrf_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetCsrfTokenResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_credentials<'life0, 'async_trait>(
&'life0 self,
domain: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<GetCredentialsResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_record<'life0, 'async_trait>(
&'life0 self,
file: String,
out_format: RecordFormat,
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_image<'life0, 'async_trait>(
&'life0 self,
file: String,
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn can_send_image<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CanSendResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn can_send_record<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CanSendResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BotStatus, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_version_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionInfo, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_restart<'life0, 'async_trait>(
&'life0 self,
delay: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clean_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Associated Types§
Required Methods§
fn send_private_message<'life0, 'async_trait, M>(
&'life0 self,
user_id: i64,
message: M,
auto_escape: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, Self::Error>> + Send + 'async_trait>>where
M: IntoMessage + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn send_group_message<'life0, 'async_trait, M>(
&'life0 self,
group_id: i64,
message: M,
auto_escape: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, Self::Error>> + Send + 'async_trait>>where
M: IntoMessage + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn delete_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<GetMessageResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_forward_message<'life0, 'async_trait>(
&'life0 self,
message_id: i64,
) -> Pin<Box<dyn Future<Output = Result<GetForwardResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_like<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
times: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_kick<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
reject_add_request: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_anonymous_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
anonymous: Option<GroupAnonymousInfo>,
flag: Option<String>,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_whole_group_ban<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_admin<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_anonymous<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
enable: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_card<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
card: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_name<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
group_name: String,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_leave<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
is_dismiss: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_special_title<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
special_title: Option<String>,
duration: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_friend_add_request<'life0, 'async_trait>(
&'life0 self,
flag: String,
approve: Option<bool>,
remark: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_group_add_request<'life0, 'async_trait>(
&'life0 self,
flag: String,
sub_type: GroupRequestSubType,
approve: Option<bool>,
reason: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_login_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<LoginInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stranger_info<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<StrangerInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_friend_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<FriendInfo>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_group_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<GroupInfoResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_group_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<GroupInfoResponse>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_group_member_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
user_id: i64,
no_cache: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<GroupInfoResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_group_member_list<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<FriendInfo>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_group_honor_info<'life0, 'async_trait>(
&'life0 self,
group_id: i64,
ty: GroupHonorType,
) -> Pin<Box<dyn Future<Output = Result<GroupHonorInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_csrf_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetCsrfTokenResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_credentials<'life0, 'async_trait>(
&'life0 self,
domain: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<GetCredentialsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_record<'life0, 'async_trait>(
&'life0 self,
file: String,
out_format: RecordFormat,
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_image<'life0, 'async_trait>(
&'life0 self,
file: String,
) -> Pin<Box<dyn Future<Output = Result<GetFileResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn can_send_image<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CanSendResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn can_send_record<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CanSendResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BotStatus, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionInfo, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_restart<'life0, 'async_trait>(
&'life0 self,
delay: Option<i32>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clean_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 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.