Struct esp8266_at_driver::Esp8266Driver
source · pub struct Esp8266Driver<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,{ /* private fields */ }
Expand description
Instance of the Esp8266 driver.
Configure MAX_SOCKETS to the max number of connections you expect to be making at the same time.
Implementations
sourceimpl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
sourcepub fn new(transport: T, enable: ENABLE, reset: RESET) -> Self
pub fn new(transport: T, enable: ENABLE, reset: RESET) -> Self
Create a new instance of the Esp8266 driver using the provided transport. The transport is usually the UART peripheral when used on a microcontroller.
The ENABLE pin is used to enable the adapter. The RESET pin is used to reset the adapter.
Trait Implementations
sourceimpl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> TcpConnect for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> TcpConnect for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
type Error = DriverError
type Error = DriverError
Error type returned on connect failure.
type Connection<'m>
where
Self: 'm = Esp8266Socket<'m, T>
type Connection<'m>
where
Self: 'm = Esp8266Socket<'m, T>
Type holding state of a TCP connection. Should close the connection when dropped.
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<<Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS> as TcpConnect>::Connection<'m>, <Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS> as TcpConnect>::Error>> + 'm
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<<Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS> as TcpConnect>::Connection<'m>, <Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS> as TcpConnect>::Error>> + 'm
Future returned by
connect
function.sourcefn connect<'m>(&'m self, remote: SocketAddr) -> Self::ConnectFuture<'m>
fn connect<'m>(&'m self, remote: SocketAddr) -> Self::ConnectFuture<'m>
Connect to the given remote host and port. Read more
Auto Trait Implementations
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> !RefUnwindSafe for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> !Send for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> !Sync for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> Unpin for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
ENABLE: Unpin,
RESET: Unpin,
T: Unpin,
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> UnwindSafe for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
ENABLE: UnwindSafe,
RESET: UnwindSafe,
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more