MCPcopy
hub / github.com/cloudflare/capnweb / Exporter

Interface Exporter

src/serialize.ts:33–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31// =======================================================================================
32
33export interface Exporter {
34 exportStub(hook: StubHook): ExportId;
35 exportPromise(hook: StubHook): ExportId;
36 getImport(hook: StubHook): ImportId | undefined;
37
38 // If a serialization error occurs after having exported some capabilities, this will be called
39 // to roll back the exports.
40 unexport(ids: Array<ExportId>): void;
41
42 // Creates a pipe by sending a ["pipe"] message, then starts pumping the given ReadableStream
43 // into the pipe's writable end. Returns the import ID assigned to the pipe. `hook` should be
44 // disposed when the pipe finishes.
45 createPipe(readable: ReadableStream, hook: StubHook): ImportId;
46
47 onSendError(error: Error): Error | void;
48}
49
50class NullExporter implements Exporter {
51 exportStub(stub: StubHook): never {

Callers 8

devaluateHookMethod · 0.65
devaluateHookMethod · 0.65
devaluateImplMethod · 0.65
devaluateMethod · 0.65
capturePropMethod · 0.65
devaluateImplMethod · 0.65
devaluateImplMethod · 0.65
onSendErrorMethod · 0.65

Implementers 3

MapBuildersrc/map.ts
NullExportersrc/serialize.ts
RpcSessionImplsrc/rpc.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…