pub async fn contact_find(&self, query: ContactQueryFilter) -> Result<Option<Contact<T>>, WechatyError> {
        debug!("contact_find(query = {:?})", query);
        match self.contact_find_all(Some(query)).await {
            Ok(contact_list) => {
                if contact_list.is_empty() {
                    Ok(None)
                } else {
                    Ok(Some(contact_list[0].clone()))
                }
            }
            Err(e) => Err(e),
        }
    }
/// Find the first contact that matches the query
Find the first contact that matches the query
Find the first contact that matches the query
pub async fn contact_find(&self, query: ContactQueryFilter) -> Result<Option<Contact<T>>, WechatyError> {
        debug!("contact_find(query = {:?})", query);
        match self.contact_find_all(Some(query)).await {
            Ok(contact_list) => {
                if contact_list.is_empty() {
                    Ok(None)
                } else {
                    Ok(Some(contact_list[0].clone()))
                }
            }
            Err(e) => Err(e),
        }
    }
pub async fn contact_find ( & self , query : ContactQueryFilter ) -> Result < Option < Contact < T > > , WechatyError > { debug ! ( " " query ) ; match self . contact_find_all ( Some ( query ) ) . await { Ok ( contact_list ) => { if contact_list . is_empty ( ) { Ok ( None ) } else { Ok ( Some ( contact_list [ 0 ] . clone ( ) ) ) } } Err ( e ) => Err ( e ) , } }
Find the first contact that matches the query
Find the first contact that matches the query
&self
query
ContactQueryFilter
&self
query
ContactQueryFilter