pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub fn new( url: String, handlers: Box<dyn PacketHandlers + Send + Sync>, ) -> Connection
pub fn authenticate(&self, key: &str)
pub fn log(&self, cl: &str, msg: &str)
pub fn on_message( &self, message: &str, user_id: &str, chat_id: &str, files: Option<Box<[&str]>>, mentions: Option<Box<[&str]>>, quote_text: Option<&str>, id: i64, )
pub fn config_request(&self, section: &str, key: &str)
pub fn tmp_file_request(&self, ext: &str, ttl: i32)
pub async fn await_exit(&self)
pub fn disconnect(&self)
pub fn debug(&self, s: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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