pub struct Imp { /* private fields */ }Expand description
Cwtch bot
Implementations§
Source§impl Imp
impl Imp
Sourcepub fn spawn(behaviour: Behaviour, password: String, home_dir: String) -> Self
pub fn spawn(behaviour: Behaviour, password: String, home_dir: String) -> Self
Create a new imp bot with the specified behaviour start_cwtch is called on it
pub fn behaviour_mut(&self) -> &Behaviour
pub fn behaviour_allowlist_add(&mut self, contact: ContactIdentity)
pub fn behaviour_allowlist_rm(&mut self, contact: ContactIdentity)
Sourcepub fn event_loop<T>(&mut self, handler: &mut T)where
T: EventHandler,
pub fn event_loop<T>(&mut self, handler: &mut T)where
T: EventHandler,
The main event loop handler for the bot, supply your own customer handler to handle events after the imp’s automatic handling has processed the event
Auto Trait Implementations§
impl Freeze for Imp
impl !RefUnwindSafe for Imp
impl !Send for Imp
impl !Sync for Imp
impl Unpin for Imp
impl !UnwindSafe for Imp
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