open#
Open a session or logical connection context for a procedure. Sessions group transactional and execution context for subsequent syscalls.
Rust API#
// sync_api
pub fn mudu_open() -> RS<OID> {
/* ... */
}
// async_api
pub async fn mudu_open() -> RS<OID> {
/* ... */
}
Conceptual signature#
open() -> OID
Parameters#
None.
Return value#
OID— a session identifier used as the first argument to subsequent syscalls such asget,put,query, andcommand.
Errors#
Session creation can fail with a host error, including invocation resource-budget exhaustion. Native calls require an explicitly configured standalone adapter; the plain host-side facade can return NotImplemented.
Transaction semantics#
Opening a session does not implicitly start a durable transaction.
Transaction boundaries are controlled by the host; the guest interface exposes no dedicated commit/rollback syscall.
Example#
let oid = mudu_open()?;
let value = mudu_get(oid, b"accounts:42")?;
mudu_close(oid)?;
Notes#
In procedure code the session
OIDis usually passed in as the first argument, so explicitopen/closeare most common in interactive tests or standalone adapter code.Always pair
openwithcloseto release session-scoped resources.