Function whatsappweb::connection::new [−][src]
pub fn new<Q: Fn(QrCode) + Send + 'static, H: WhatsappWebHandler<H> + Send + Sync + 'static>(
qr_cb: Q,
handler: H
) -> (WhatsappWebConnection<H>, JoinHandle<()>)
Create new connection and session.
Will eventual call qr_cb
with the generated qr-code.