Returns the length of the array.
(&self)
| 83 | |
| 84 | /// Returns the length of the array. |
| 85 | pub fn len(&self) -> usize { |
| 86 | match self { |
| 87 | Self::Sum(v) => v.len(), |
| 88 | Self::Product(v) => v.len(), |
| 89 | Self::Bool(v) => v.len(), |
| 90 | Self::I8(v) => v.len(), |
| 91 | Self::U8(v) => v.len(), |
| 92 | Self::I16(v) => v.len(), |
| 93 | Self::U16(v) => v.len(), |
| 94 | Self::I32(v) => v.len(), |
| 95 | Self::U32(v) => v.len(), |
| 96 | Self::I64(v) => v.len(), |
| 97 | Self::U64(v) => v.len(), |
| 98 | Self::I128(v) => v.len(), |
| 99 | Self::U128(v) => v.len(), |
| 100 | Self::I256(v) => v.len(), |
| 101 | Self::U256(v) => v.len(), |
| 102 | Self::F32(v) => v.len(), |
| 103 | Self::F64(v) => v.len(), |
| 104 | Self::String(v) => v.len(), |
| 105 | Self::Array(v) => v.len(), |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | /// Returns whether the array is empty. |
| 110 | #[must_use] |