Function spirt::spv::extract_literal_string
source · pub fn extract_literal_string(imms: &[Imm]) -> Result<String, FromUtf8Error>
Expand description
Given a single LiteralString
(as one Imm::Short
or a Imm::LongStart
followed by some number of Imm::LongCont
- will panic otherwise), returns a
Rust String
if the literal is valid UTF-8, or the validation error otherwise.