pub struct WechatyContext<T>{ /* private fields */ }Implementations§
Source§impl<T> WechatyContext<T>
impl<T> WechatyContext<T>
Sourcepub async fn contact_find(
&self,
query: ContactQueryFilter,
) -> Result<Option<Contact<T>>, WechatyError>
pub async fn contact_find( &self, query: ContactQueryFilter, ) -> Result<Option<Contact<T>>, WechatyError>
Find the first contact that matches the query
Sourcepub async fn contact_find_by_string(
&self,
query_str: String,
) -> Result<Option<Contact<T>>, WechatyError>
pub async fn contact_find_by_string( &self, query_str: String, ) -> Result<Option<Contact<T>>, WechatyError>
Find the first contact that matches the query string
Sourcepub async fn contact_find_all(
&self,
query: Option<ContactQueryFilter>,
) -> Result<Vec<Contact<T>>, WechatyError>
pub async fn contact_find_all( &self, query: Option<ContactQueryFilter>, ) -> Result<Vec<Contact<T>>, WechatyError>
Find all contacts that match the query
Sourcepub async fn contact_find_all_by_string(
&self,
query_str: String,
) -> Result<Vec<Contact<T>>, WechatyError>
pub async fn contact_find_all_by_string( &self, query_str: String, ) -> Result<Vec<Contact<T>>, WechatyError>
Find all contacts that match the query string
Sourcepub async fn message_find(
&self,
query: MessageQueryFilter,
) -> Result<Option<Message<T>>, WechatyError>
pub async fn message_find( &self, query: MessageQueryFilter, ) -> Result<Option<Message<T>>, WechatyError>
Find the first message that matches the query
Sourcepub async fn message_find_all(
&self,
query: MessageQueryFilter,
) -> Result<Vec<Message<T>>, WechatyError>
pub async fn message_find_all( &self, query: MessageQueryFilter, ) -> Result<Vec<Message<T>>, WechatyError>
Find all messages that match the query
Sourcepub async fn room_create(
&self,
contact_list: Vec<Contact<T>>,
topic: Option<String>,
) -> Result<Room<T>, WechatyError>
pub async fn room_create( &self, contact_list: Vec<Contact<T>>, topic: Option<String>, ) -> Result<Room<T>, WechatyError>
Create a room.
Sourcepub async fn room_find(
&self,
query: RoomQueryFilter,
) -> Result<Option<Room<T>>, WechatyError>
pub async fn room_find( &self, query: RoomQueryFilter, ) -> Result<Option<Room<T>>, WechatyError>
Find the first room that matches the query
Sourcepub async fn room_find_all(
&self,
query: RoomQueryFilter,
) -> Result<Vec<Room<T>>, WechatyError>
pub async fn room_find_all( &self, query: RoomQueryFilter, ) -> Result<Vec<Room<T>>, WechatyError>
Find all rooms that match the query
Sourcepub async fn friendship_add(
&self,
contact: Contact<T>,
hello: Option<String>,
) -> Result<(), WechatyError>
pub async fn friendship_add( &self, contact: Contact<T>, hello: Option<String>, ) -> Result<(), WechatyError>
Add friendship with contact.
Sourcepub async fn friendship_search(
&self,
query: FriendshipSearchQueryFilter,
) -> Result<Option<Contact<T>>, WechatyError>
pub async fn friendship_search( &self, query: FriendshipSearchQueryFilter, ) -> Result<Option<Contact<T>>, WechatyError>
Search a friendship.
First search by phone, then search by weixin.
Sourcepub async fn logout(&self) -> Result<(), WechatyError>
pub async fn logout(&self) -> Result<(), WechatyError>
Logout current account.
Trait Implementations§
Source§impl<T> Clone for WechatyContext<T>
impl<T> Clone for WechatyContext<T>
Source§fn clone(&self) -> WechatyContext<T>
fn clone(&self) -> WechatyContext<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for WechatyContext<T>where
T: Freeze,
impl<T> !RefUnwindSafe for WechatyContext<T>
impl<T> Send for WechatyContext<T>
impl<T> Sync for WechatyContext<T>
impl<T> Unpin for WechatyContext<T>
impl<T> !UnwindSafe for WechatyContext<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more