pub async fn contact_find_by_string(&self, query_str: String) -> Result<Option<Contact<T>>, WechatyError> {
        debug!("contact_find_by_string(query_str = {:?})", query_str);
        match self.contact_find_all_by_string(query_str).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 string
Find the first contact that matches the query string
Find the first contact that matches the query string
pub async fn contact_find_by_string(&self, query_str: String) -> Result<Option<Contact<T>>, WechatyError> {
        debug!("contact_find_by_string(query_str = {:?})", query_str);
        match self.contact_find_all_by_string(query_str).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_by_string ( & self , query_str : String ) -> Result < Option < Contact < T > > , WechatyError > { debug ! ( " " query_str ) ; match self . contact_find_all_by_string ( query_str ) . 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 string
Find the first contact that matches the query string
&self
query_str
String
&self
query_str
String