| import * as Schema from "../../Schema.js"; | |
| /** | |
| * Converts a bigint or string request id into the branded `RequestId` type. | |
| * | |
| * @category request | |
| * @since 4.0.0 | |
| */ | |
| export const RequestId = id => typeof id === "bigint" ? id : BigInt(id); | |
| /** | |
| * Represents the reusable `Eof` message value. | |
| * | |
| * @category request | |
| * @since 4.0.0 | |
| */ | |
| export const constEof = { | |
| _tag: "Eof" | |
| }; | |
| /** | |
| * Represents the reusable `Ping` message value. | |
| * | |
| * @category request | |
| * @since 4.0.0 | |
| */ | |
| export const constPing = { | |
| _tag: "Ping" | |
| }; | |
| /** | |
| * The brand identifier used by the `ResponseId` type. | |
| * | |
| * @category type IDs | |
| * @since 4.0.0 | |
| */ | |
| export const ResponseIdTypeId = "~effect//rpc/RpcServer/ResponseId"; | |
| const encodeDefect = /*#__PURE__*/Schema.encodeSync(/*#__PURE__*/Schema.Defect()); | |
| /** | |
| * Creates an encoded terminal response for a request whose exit is a defect | |
| * encoded with `Schema.Defect()`. | |
| * | |
| * @category response | |
| * @since 4.0.0 | |
| */ | |
| export const ResponseExitDieEncoded = options => ({ | |
| _tag: "Exit", | |
| requestId: options.requestId.toString(), | |
| exit: { | |
| _tag: "Failure", | |
| cause: [{ | |
| _tag: "Die", | |
| defect: encodeDefect(options.defect) | |
| }] | |
| } | |
| }); | |
| /** | |
| * Creates a transport-encoded defect response by encoding the input with | |
| * `Schema.Defect()`. | |
| * | |
| * @category response | |
| * @since 4.0.0 | |
| */ | |
| export const ResponseDefectEncoded = input => ({ | |
| _tag: "Defect", | |
| defect: encodeDefect(input) | |
| }); | |
| /** | |
| * Represents the reusable `Pong` message value. | |
| * | |
| * @category response | |
| * @since 4.0.0 | |
| */ | |
| export const constPong = { | |
| _tag: "Pong" | |
| }; | |
| //# sourceMappingURL=RpcMessage.js.map |
Xet Storage Details
- Size:
- 1.6 kB
- Xet hash:
- 4672531e90806656981e48ae1e037ad384082371d40bb476c800c11b95e90614
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.