pub trait Event: Send {
    fn handle_connect(&mut self, client: &mut Client) { ... }
    fn handle_disconnect(&mut self) { ... }
    fn handle_internal(&mut self, client: &mut Client, data: &[String]) { ... }
    fn handle_vpin_read(&mut self, client: &mut Client, pin_num: u8) { ... }
    fn handle_vpin_write(
        &mut self,
        client: &mut Client,
        pin_num: u8,
        data: &str
    ) { ... } }
Expand description

Used in order to implement handler logic for requests coming from Blynk.io servers and various transitions between connection states.

Example

use blynk_io::*;

struct EventsHandler;
impl Event for EventsHandler {
    fn handle_vpin_write(&mut self, _client: &mut Client, pin_num: u8, data: &str) {
        println!("pin {:?} write {:?}", pin_num, data);
    }
}

Provided methods

Implementors