Skip to main content

Context

Struct Context 

Source
pub struct Context { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl ApiExt for Context

Source§

type Error = FlowError

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V