MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / as_string

Method as_string

aiscript-vm/src/value.rs:182–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

180 }
181
182 pub fn as_string(self) -> Result<InternedString<'gc>, VmError> {
183 match self {
184 Value::String(value) => Ok(value),
185 v => Err(VmError::RuntimeError(format!(
186 "cannot convert to string, the value is {v}"
187 ))),
188 }
189 }
190
191 // Helper method to convert any string value to a common format
192 pub fn as_string_value(&self) -> Result<StringValue<'gc>, VmError> {

Callers 15

io_inputFunction · 0.80
http_getFunction · 0.80
http_postFunction · 0.80
http_putFunction · 0.80
http_deleteFunction · 0.80
http_patchFunction · 0.80
http_headFunction · 0.80
env_getFunction · 0.80
env_setFunction · 0.80
build_claimsFunction · 0.80
jwt_encodeFunction · 0.80
jwt_decodeFunction · 0.80

Calls 1

RuntimeErrorClass · 0.85

Tested by

no test coverage detected