File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,6 +215,10 @@ impl CommandType {
215215 }
216216 }
217217
218+ /// Return an assumed maximum response length for the [`CommandType`]
219+ /// variant.
220+ ///
221+ /// Default length is assumed 5MiB.
218222 pub fn max_respose_len ( & self ) -> u64 {
219223 match self {
220224 CommandType :: Sync => SYNC_MAX_LEN ,
Original file line number Diff line number Diff line change @@ -542,7 +542,7 @@ impl Connection {
542542 Ok ( Some ( header) )
543543 }
544544
545- /// Reads the response from a serial port.
545+ /// Reads the response from a serial port, bounded by `max_len` bytes .
546546 pub fn read_response ( & mut self , max_len : u64 ) -> Result < Option < CommandResponse > , Error > {
547547 match self . read_bounded ( 10 , max_len) ? {
548548 None => Ok ( None ) ,
@@ -598,7 +598,7 @@ impl Connection {
598598 }
599599 }
600600
601- /// Reads the response from a serial port.
601+ /// Reads the response from a serial port for a given [`CommandType`] .
602602 pub fn read_response_for_command (
603603 & mut self ,
604604 ty : CommandType ,
You can’t perform that action at this time.
0 commit comments