File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -250,9 +250,13 @@ where
250250 T : embedded_io:: Write + embedded_io:: Read + embedded_io:: ReadReady ,
251251{
252252 /// Create a new `Runner`. You need to supply a top-level menu, and a
253- /// buffer that the `Runner` can use. Feel free to pass anything as the
254- /// `context` type - the only requirement is that the `Runner` can
255- /// `write!` to the context, which it will do for all text output.
253+ /// buffer that the `Runner` can use.
254+ ///
255+ /// The `context` parameter is used for handling I/O of the menu. It must implement the
256+ /// respective [`embedded-io`] traits to enable the menu to process input and output.
257+ ///
258+ /// The `context` is also passed to menu callback functions, so it can be used for maintaining
259+ /// state of anything that the menu may control as well.
256260 pub fn new ( menu : Menu < ' a , T > , buffer : & ' a mut [ u8 ] , context : & mut T ) -> Self {
257261 if let Some ( cb_fn) = menu. entry {
258262 cb_fn ( & menu, context) ;
You can’t perform that action at this time.
0 commit comments