MCPcopy Create free account
hub / github.com/ad-si/LuaCAD / table_segments

Function table_segments

crates/luacad/src/lua_engine.rs:32–36  ·  view source on GitHub ↗

Get segments from table: checks "segments" and "fn" keys, returns default otherwise.

(t: &mlua::Table, default: u32)

Source from the content-addressed store, hash-verified

30 key: &str,
31) -> mlua::Result<bool> {
32 match t.get::<mlua::Value>(key)? {
33 LuaValue::Nil => Ok(false),
34 LuaValue::Boolean(b) => Ok(b),
35 v => Err(mlua::Error::RuntimeError(format!(
36 "{func}() parameter '{key}' must be a boolean, got {}",
37 v.type_name()
38 ))),
39 }

Callers 3

parse_sphere_argsFunction · 0.85
parse_cylinder_argsFunction · 0.85
execute_luaFunction · 0.85

Calls 1

table_get_u32Function · 0.70

Tested by

no test coverage detected