pub struct RustBackendAdapter<R>(/* private fields */);Expand description
Wraps a Rust Rmw backend behind the canonical
NrosRmwVtable C ABI. See module docs.
Implementations§
Source§impl<R: RustBackend> RustBackendAdapter<R>
impl<R: RustBackend> RustBackendAdapter<R>
Sourcepub const VTABLE: NrosRmwVtable
pub const VTABLE: NrosRmwVtable
Monomorphised vtable for backend R. The const is promoted
to per-type static storage, so &Self::VTABLE has 'static
lifetime — safe to hand to nros_rmw_cffi_register.
Sourcepub fn register() -> NrosRmwRet
pub fn register() -> NrosRmwRet
Install the per-R vtable into the cffi registry under the
implicit name "default". Idempotent — re-registering the
same vtable is a no-op from the runtime’s perspective.
Most backends should use register_named
instead so they show up in the registry under their canonical
name ("zenoh", "dds", "xrce", …). Phase 128.B.5 routes
the implicit-name path through _register_named too, so the
legacy unnamed C shim no longer participates in registration.
Sourcepub unsafe fn register_named(name: *const c_char) -> NrosRmwRet
pub unsafe fn register_named(name: *const c_char) -> NrosRmwRet
Phase 104.B.2 — install the per-R vtable under a stable
name. Multiple backends can coexist via this entry point.
§Safety
name must be a valid NUL-terminated UTF-8 string.