pub struct ProgrammedHC12<Device, Pin> { /* private fields */ }
Expand description
A programmed HC-12 device. This can be used directly as a serial device, or returned to AT (programming) mode, or decomposed to return the pin and the serial device used in programming the module
Implementations§
Source§impl<Device, Pin> ProgrammedHC12<Device, Pin>
impl<Device, Pin> ProgrammedHC12<Device, Pin>
Sourcepub fn inner(self) -> (Device, Pin)
pub fn inner(self) -> (Device, Pin)
Decompose the device to its serial port and programming pin
Trait Implementations§
Source§impl<Device, Pin> ErrorType for ProgrammedHC12<Device, Pin>where
Device: ErrorType,
impl<Device, Pin> ErrorType for ProgrammedHC12<Device, Pin>where
Device: ErrorType,
Source§impl<Device, Pin> Read for ProgrammedHC12<Device, Pin>where
Device: Read,
impl<Device, Pin> Read for ProgrammedHC12<Device, Pin>where
Device: Read,
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moreSource§impl<Device, Pin> ReadReady for ProgrammedHC12<Device, Pin>where
Device: ReadReady,
impl<Device, Pin> ReadReady for ProgrammedHC12<Device, Pin>where
Device: ReadReady,
Source§impl<Device, Pin> Write for ProgrammedHC12<Device, Pin>where
Device: Write,
impl<Device, Pin> Write for ProgrammedHC12<Device, Pin>where
Device: Write,
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Source§impl<Device, Pin> WriteReady for ProgrammedHC12<Device, Pin>where
Device: WriteReady,
impl<Device, Pin> WriteReady for ProgrammedHC12<Device, Pin>where
Device: WriteReady,
Auto Trait Implementations§
impl<Device, Pin> Freeze for ProgrammedHC12<Device, Pin>
impl<Device, Pin> RefUnwindSafe for ProgrammedHC12<Device, Pin>where
Device: RefUnwindSafe,
Pin: RefUnwindSafe,
impl<Device, Pin> Send for ProgrammedHC12<Device, Pin>
impl<Device, Pin> Sync for ProgrammedHC12<Device, Pin>
impl<Device, Pin> Unpin for ProgrammedHC12<Device, Pin>
impl<Device, Pin> UnwindSafe for ProgrammedHC12<Device, Pin>where
Device: UnwindSafe,
Pin: UnwindSafe,
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