MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / new_composite

Method new_composite

wasm-pdk/src/lib.rs:578–585  ·  view source on GitHub ↗

Shared constructor: passes item handles as argv to a NEW_* op.

(op: u32, items: &[u32])

Source from the content-addressed store, hash-verified

576
577 // Shared constructor: passes item handles as argv to a NEW_* op.
578 fn new_composite(op: u32, items: &[u32]) -> Result<Handle> {
579 let mut out: u32 = 0;
580 let r = unsafe {
581 edge_op(op, 0, core::ptr::null(), 0, items.as_ptr(), items.len() as u32, &mut out as *mut u32)
582 };
583 if r != 0 { return Err(last_error()); }
584 Ok(Handle::from_raw(out))
585 }
586
587 /// `type(recv).__name__`; returns a fresh str handle naming the runtime type.
588 pub fn type_of(&self) -> Result<Handle> {

Callers

nothing calls this directly

Calls 2

last_errorFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected