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

Method as_array

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

Source from the content-addressed store, hash-verified

216 }
217
218 pub fn as_array(self) -> Result<GcRefLock<'gc, List<'gc>>, VmError> {
219 match self {
220 Value::List(list) => Ok(list),
221 v => Err(VmError::RuntimeError(format!(
222 "cannot convert to array, the value is {v}"
223 ))),
224 }
225 }
226
227 pub fn as_agent(self) -> Result<Gc<'gc, Agent<'gc>>, VmError> {
228 match self {

Callers 13

parse_auth_fieldsFunction · 0.80
appendFunction · 0.80
extendFunction · 0.80
insertFunction · 0.80
removeFunction · 0.80
popFunction · 0.80
clearFunction · 0.80
indexFunction · 0.80
sliceFunction · 0.80
countFunction · 0.80
sortFunction · 0.80
reverseFunction · 0.80

Calls 1

RuntimeErrorClass · 0.85

Tested by

no test coverage detected