(v: &'a SBValue)
| 649 | } |
| 650 | |
| 651 | fn value_to_str<'a>(v: &'a SBValue) -> Result<&'a str> { |
| 652 | match v.value() { |
| 653 | Some(s) => s.to_str().map_err(|_| WriteErr), |
| 654 | None => Err(WriteErr), |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | pub(crate) fn value_to_bytes<const N: usize>(v: &SBValue) -> Result<[u8; N]> { |
| 659 | let mut bytes = [0; N]; |
no test coverage detected