The size of this array format in bytes.
(&self)
| 44 | impl ArrayFormat { |
| 45 | /// The size of this array format in bytes. |
| 46 | pub fn mem_size(&self) -> usize { |
| 47 | use ArrayFormat::*; |
| 48 | |
| 49 | match self { |
| 50 | U8 | I8 => 1, |
| 51 | U16 | I16 => 2, |
| 52 | U32 | I32 | F32 => 4, |
| 53 | F64 => 8, |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | mod private { |
no outgoing calls
no test coverage detected