pub struct LightCliInput<SLEN>where
SLEN: ArrayLength<u8>,{ /* private fields */ }
Implementations§
Source§impl<SLEN: ArrayLength<u8>> LightCliInput<SLEN>
impl<SLEN: ArrayLength<u8>> LightCliInput<SLEN>
Sourcepub fn parse_data<CB>(&mut self, callback: CB) -> Result<(), Error>where
CB: FnMut(CallbackCommand<'_>),
pub fn parse_data<CB>(&mut self, callback: CB) -> Result<(), Error>where
CB: FnMut(CallbackCommand<'_>),
Try to parse as much data from the internal ring buffer as possible.
§Arguments
callback
- This is the callback that will receive all parsing events.
§Remarks
All commands are in the form “COMMAND KEY=VALUE”. For every parsed key/value pair the callback will be triggered with the current command string, current key and the corresponding value. When a newline is read the callback is triggered with a command event.
Auto Trait Implementations§
impl<SLEN> !Freeze for LightCliInput<SLEN>
impl<SLEN> !RefUnwindSafe for LightCliInput<SLEN>
impl<SLEN> Send for LightCliInput<SLEN>
impl<SLEN> !Sync for LightCliInput<SLEN>
impl<SLEN> Unpin for LightCliInput<SLEN>
impl<SLEN> UnwindSafe for LightCliInput<SLEN>
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