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::*;
10
10
/// A CAN2.0 Frame
11
11
pub trait Frame : Sized {
12
12
/// 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 > ;
15
16
16
17
/// 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 > ;
19
21
20
22
/// Returns true if this frame is a extended frame.
21
23
fn is_extended ( & self ) -> bool ;
You can’t perform that action at this time.
0 commit comments