Struct riot_wrappers::shell::Command
source · pub struct Command<'a, Next, H, T = i32>{ /* private fields */ }
Available on
riot_module_shell
only.Expand description
Internal helper that holds the data assembled using the CommandList::and
builder
(Exposed publicly as the CommandList::and
trait method can not return an impl CommandList
yet)
Trait Implementations§
source§impl<'a, Next, H, T, const BUFSIZE: usize> CommandList<BUFSIZE> for Command<'a, Next, H, T>
impl<'a, Next, H, T, const BUFSIZE: usize> CommandList<BUFSIZE> for Command<'a, Next, H, T>
source§fn with_buffer_size<const NEWSIZE: usize>(
self
) -> Self::WithBufferSizeResult<NEWSIZE>
fn with_buffer_size<const NEWSIZE: usize>( self ) -> Self::WithBufferSizeResult<NEWSIZE>
Change the buffer size used for
.run_forever_providing_buf()
. Read moretype WithBufferSizeResult<const NEWSIZE: usize> = Command<'a, Next, H, T>
fn run_once_with_buf(&mut self, linebuffer: &mut [u8])
source§fn run_once(&mut self, linebuffer: &mut [u8])
fn run_once(&mut self, linebuffer: &mut [u8])
👎Deprecated: Use run_once_with_buf, or just run_once_providing_buf, which will take over this name in the next breaking release
fn run_forever_with_buf(&mut self, linebuffer: &mut [u8]) -> !
source§fn run_forever(&mut self, linebuffer: &mut [u8]) -> !
fn run_forever(&mut self, linebuffer: &mut [u8]) -> !
👎Deprecated: Use run_forever_with_buf, or just run_forever_providing_buf, which will take over this name in the next breaking release
source§fn run_forever_providing_buf(&mut self) -> !
fn run_forever_providing_buf(&mut self) -> !
Run the shell prompt on stdio Read more
source§fn run_once_providing_buf(&mut self)
fn run_once_providing_buf(&mut self)
Run the shell prompt on stdio until EOF is reached Read more
source§impl<'a, Next, H, T> CommandListInternals for Command<'a, Next, H, T>
impl<'a, Next, H, T> CommandListInternals for Command<'a, Next, H, T>
type Built = BuiltCommand<<Next as CommandListInternals>::Built>
fn build_shell_command<Root: CommandListInternals>(&self) -> Self::Built
source§fn find_self_and_run(
&mut self,
argc: i32,
argv: *mut *mut c_char,
command_index: usize
) -> i32
fn find_self_and_run( &mut self, argc: i32, argv: *mut *mut c_char, command_index: usize ) -> i32
Run your own callback with argc and argv if the called argument is what the implementation
put into its own entry of its Built, or defer to its next.
fn run_any<R, F: Fn(*const shell_command_t, *mut c_char, i32) -> R>( &mut self, linebuffer: &mut [u8], cb: F ) -> R
fn find_root_and_run( argc: i32, argv: *mut *mut c_char, command_index: usize ) -> i32
Auto Trait Implementations§
impl<'a, Next, H, T> RefUnwindSafe for Command<'a, Next, H, T>where
H: RefUnwindSafe,
Next: RefUnwindSafe,
impl<'a, Next, H, T> Send for Command<'a, Next, H, T>
impl<'a, Next, H, T> Sync for Command<'a, Next, H, T>
impl<'a, Next, H, T> Unpin for Command<'a, Next, H, T>
impl<'a, Next, H, T> UnwindSafe for Command<'a, Next, H, T>where
H: UnwindSafe,
Next: 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