Retrieve the constant data as a byte slice.
(&self)
| 1935 | impl VCodeConstantData { |
| 1936 | /// Retrieve the constant data as a byte slice. |
| 1937 | pub fn as_slice(&self) -> &[u8] { |
| 1938 | match self { |
| 1939 | VCodeConstantData::Pool(_, d) | VCodeConstantData::Generated(d) => d.as_slice(), |
| 1940 | VCodeConstantData::WellKnown(d) => d, |
| 1941 | VCodeConstantData::U64(value) => &value[..], |
| 1942 | } |
| 1943 | } |
| 1944 | |
| 1945 | /// Calculate the alignment of the constant data. |
| 1946 | pub fn alignment(&self) -> u32 { |
no outgoing calls
no test coverage detected