Reply.ts overview
Since v1.0.0
Exports Grouped by Category
- guards
- models
- schemas
- serialization / deserialization
- type ids
guards
isReply
Signature
declare const isReply: (u: unknown) => u is Reply<Rpc.Any>
Since v1.0.0
models
Chunk (class)
Signature
declare class Chunk<R>
Since v1.0.0
emptyFrom (static method)
Signature
declare const emptyFrom: (requestId: Snowflake) => Chunk<Rpc.Any>
Since v1.0.0
schema (static method)
Signature
declare const schema: <R extends Rpc.Any>(rpc: R) => Schema.Schema<Chunk<R>, ChunkEncoded<R>, Rpc.Context<R>>
Since v1.0.0
withRequestId (method)
Signature
declare const withRequestId: (requestId: Snowflake) => Chunk<R>
Since v1.0.0
[TypeId] (property)
Signature
readonly [TypeId]: symbol
Since v1.0.0
ChunkEncoded (interface)
Signature
export interface ChunkEncoded<R extends Rpc.Any> {
readonly _tag: "Chunk"
readonly requestId: string
readonly id: string
readonly sequence: number
readonly values: NonEmptyReadonlyArray<Rpc.SuccessChunkEncoded<R>>
}
Since v1.0.0
Reply (type alias)
Signature
type Reply<R> = WithExit<R> | Chunk<R>
Since v1.0.0
ReplyEncoded (type alias)
Signature
type ReplyEncoded<R> = WithExitEncoded<R> | ChunkEncoded<R>
Since v1.0.0
ReplyWithContext (class)
Signature
declare class ReplyWithContext<R>
Since v1.0.0
fromDefect (static method)
Signature
declare const fromDefect: (options: {
readonly id: Snowflake
readonly requestId: Snowflake
readonly defect: unknown
}) => ReplyWithContext<any>
Since v1.0.0
WithExit (class)
Signature
declare class WithExit<R>
Since v1.0.0
schema (static method)
Signature
declare const schema: <R extends Rpc.Any>(rpc: R) => Schema.Schema<WithExit<R>, WithExitEncoded<R>, Rpc.Context<R>>
Since v1.0.0
withRequestId (method)
Signature
declare const withRequestId: (requestId: Snowflake) => WithExit<R>
Since v1.0.0
[TypeId] (property)
Signature
readonly [TypeId]: symbol
Since v1.0.0
WithExitEncoded (interface)
Signature
export interface WithExitEncoded<R extends Rpc.Any> {
readonly _tag: "WithExit"
readonly requestId: string
readonly id: string
readonly exit: Rpc.ExitEncoded<R>
}
Since v1.0.0
schemas
Encoded
Signature
declare const Encoded: any
Since v1.0.0
Reply
Signature
declare const Reply: <R extends Rpc.Any>(rpc: R) => Schema.Schema<Reply<R>, ReplyEncoded<R>, Rpc.Context<R>>
Since v1.0.0
serialization / deserialization
serialize
Signature
declare const serialize: <R extends Rpc.Any>(
self: ReplyWithContext<R>
) => Effect.Effect<ReplyEncoded<R>, MalformedMessage>
Since v1.0.0
serializeLastReceived
Signature
declare const serializeLastReceived: <R extends Rpc.Any>(
self: OutgoingRequest<R>
) => Effect.Effect<Option.Option<ReplyEncoded<R>>, MalformedMessage>
Since v1.0.0
type ids
TypeId
Signature
declare const TypeId: unique symbol
Since v1.0.0
TypeId (type alias)
Signature
type TypeId = typeof TypeId
Since v1.0.0