MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / __describe_module__

Method __describe_module__

crates/bindings-cpp/src/internal/Module.cpp:376–386  ·  view source on GitHub ↗

FFI export - V10 serialization

Source from the content-addressed store, hash-verified

374
375// FFI export - V10 serialization
376void Internal::Module::__describe_module__(BytesSink sink) {
377 // The preinit functions should have already been called by SpacetimeDB
378 // Including our validation preinit which checks for recursive types
379 std::vector<uint8_t> buffer = SerializeModuleDef();
380
381 // Now try to write using FFI directly
382 if (!buffer.empty()) {
383 size_t bytes_to_write = buffer.size();
384 FFI::bytes_sink_write(sink, buffer.data(), &bytes_to_write);
385 }
386}
387
388// Helper to consume all bytes from a BytesSource
389std::vector<uint8_t> ConsumeBytes(BytesSource source) {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected