pub struct Client { /* private fields */ }Expand description
Implements state of the connection abstraction with Blynk.io servers. Implementes protocol methods that you can use in order to communicate with those servers
Implementations
sourceimpl Client
impl Client
pub fn set_read_timeout(&mut self, duration: Duration)
Trait Implementations
sourceimpl Protocol for Client
impl Protocol for Client
type T = TcpStream
fn set_reader(&mut self, reader: BufReader<TcpStream>)
fn reader(&mut self) -> Option<&mut BufReader<TcpStream>>
fn msg_id(&mut self) -> u16
fn disconnect(&mut self)
fn set_stream(&mut self, stream: Self::T)
fn read(&mut self) -> Result<Message, Box<dyn Error>>
fn stream(&mut self) -> Result<&mut Self::T, Box<dyn Error>>
fn login(&mut self, token: &str) -> Result<(), Box<dyn Error>>
fn heartbeat(
&mut self,
heartbeat: Duration,
rcv_buffer: u16
) -> Result<(), Box<dyn Error>>
fn ping(&mut self) -> Result<(), Box<dyn Error>>
fn response(&mut self, status: u16, msg_id: u16) -> Result<(), Box<dyn Error>>
fn virtual_write(&mut self, v_pin: u8, val: &str) -> Result<(), Box<dyn Error>>
fn virtual_sync(&mut self, pins: Vec<u32>) -> Result<(), Box<dyn Error>>
fn email(
&mut self,
to: &str,
subject: &str,
body: &str
) -> Result<(), Box<dyn Error>>
fn tweet(&mut self, msg: &str) -> Result<(), Box<dyn Error>>
fn notify(&mut self, msg: &str) -> Result<(), Box<dyn Error>>
fn set_property(
&mut self,
pin: u8,
prop: &str,
val: &str
) -> Result<(), Box<dyn Error>>
fn internal(&mut self, data: Vec<&str>) -> Result<(), Box<dyn Error>>
fn send(&mut self, msg: Vec<u8>) -> Result<(), Box<dyn Error>>
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more