Function
serializeEnvelope
(
message: Outgoing<Rpc>
)
Source from the content-addressed store, hash-verified
| 233 | * @since 4.0.0 |
| 234 | */ |
| 235 | export const serializeEnvelope = <Rpc extends Rpc.Any>( |
| 236 | message: Outgoing<Rpc> |
| 237 | ): Effect.Effect<Envelope.Encoded, MalformedMessage, never> => |
| 238 | Effect.flatMap( |
| 239 | serialize(message), |
| 240 | (envelope) => MalformedMessage.refail(Schema.encodeEffect(Envelope.PartialJson)(envelope)) |
| 241 | ) |
| 242 | |
| 243 | /** |
| 244 | * Encodes the payload of an `OutgoingRequest` with the request's RPC payload |
Callers
nothing calls this directly
Tested by
no test coverage detected