pub trait Protocol {
type T: Read + Write;
Show 19 methods
fn set_reader(&mut self, reader: BufReader<Self::T>);
fn msg_id(&mut self) -> u16;
fn disconnect(&mut self);
fn reader(&mut self) -> Option<&mut BufReader<Self::T>>;
fn set_stream(&mut self, stream: Self::T) { ... }
fn read(&mut self) -> Result<Message, BlynkError> { ... }
fn stream(&mut self) -> Result<&mut Self::T, BlynkError> { ... }
fn login(&mut self, token: &str) -> Result<(), BlynkError> { ... }
fn heartbeat(
&mut self,
heartbeat: Duration,
rcv_buffer: u16
) -> Result<(), BlynkError> { ... }
fn ping(&mut self) -> Result<(), BlynkError> { ... }
fn response(&mut self, status: u16, msg_id: u16) -> Result<(), BlynkError> { ... }
fn virtual_write(&mut self, v_pin: u8, val: &str) -> Result<(), BlynkError> { ... }
fn virtual_sync(&mut self, pins: Vec<u32>) -> Result<(), BlynkError> { ... }
fn email(
&mut self,
to: &str,
subject: &str,
body: &str
) -> Result<(), BlynkError> { ... }
fn tweet(&mut self, msg: &str) -> Result<(), BlynkError> { ... }
fn notify(&mut self, msg: &str) -> Result<(), BlynkError> { ... }
fn set_property(
&mut self,
pin: u8,
prop: &str,
val: &str
) -> Result<(), BlynkError> { ... }
fn internal(&mut self, data: Vec<&str>) -> Result<(), BlynkError> { ... }
fn send(&mut self, msg: Vec<u8>) -> Result<(), BlynkError> { ... }
}Expand description
Provides implementation of all known blynk.io api protocol methods