| 6 | }; |
| 7 | |
| 8 | pub trait AttData { |
| 9 | fn readable(&self) -> bool { |
| 10 | false |
| 11 | } |
| 12 | |
| 13 | fn read(&mut self, _offset: usize, _data: &mut [u8]) -> Result<usize, AttErrorCode> { |
| 14 | Ok(0) |
| 15 | } |
| 16 | |
| 17 | fn writable(&self) -> bool { |
| 18 | false |
| 19 | } |
| 20 | |
| 21 | fn write(&mut self, _offset: usize, _data: &[u8]) -> Result<(), AttErrorCode> { |
| 22 | Ok(()) |
| 23 | } |
| 24 | |
| 25 | fn enable_notification(&mut self, _enabled: bool) -> Result<(), AttErrorCode> { |
| 26 | Ok(()) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | impl<'a, const N: usize> AttData for &'a [u8; N] { |
| 31 | fn readable(&self) -> bool { |
nothing calls this directly
no outgoing calls
no test coverage detected