File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,14 @@ pub use id::*;
1010/// A CAN2.0 Frame
1111pub trait Frame : Sized {
1212 /// Creates a new frame.
13- /// Returns an error when the data slice is too long.
14- fn new ( id : impl Into < Id > , data : & [ u8 ] ) -> Result < Self , ( ) > ;
13+ ///
14+ /// This will return `None` if the data slice is too long.
15+ fn new ( id : impl Into < Id > , data : & [ u8 ] ) -> Option < Self > ;
1516
1617 /// Creates a new remote frame (RTR bit set).
17- /// Returns an error when the data length code (DLC) is not valid.
18- fn new_remote ( id : impl Into < Id > , dlc : usize ) -> Result < Self , ( ) > ;
18+ ///
19+ /// This will return `None` if the data length code (DLC) is not valid.
20+ fn new_remote ( id : impl Into < Id > , dlc : usize ) -> Option < Self > ;
1921
2022 /// Returns true if this frame is a extended frame.
2123 fn is_extended ( & self ) -> bool ;
You can’t perform that action at this time.
0 commit comments