/**
 * @since 4.0.0
 */
import * as Msgpackr from "msgpackr";
import * as Context from "../../Context.ts";
import * as Layer from "../../Layer.ts";
declare const RpcSerialization_base: Context.ServiceClass<RpcSerialization, "effect/rpc/RpcSerialization", {
    makeUnsafe(): Parser;
    readonly contentType: string;
    readonly includesFraming: boolean;
}>;
/**
 * @since 4.0.0
 * @category serialization
 */
export declare class RpcSerialization extends RpcSerialization_base {
}
/**
 * @since 4.0.0
 * @category serialization
 */
export interface Parser {
    readonly decode: (data: Uint8Array | string) => ReadonlyArray<unknown>;
    readonly encode: (response: unknown) => Uint8Array | string | undefined;
}
/**
 * @since 4.0.0
 * @category serialization
 */
export declare const json: RpcSerialization["Service"];
/**
 * @since 4.0.0
 * @category serialization
 */
export declare const ndjson: RpcSerialization["Service"];
/**
 * @since 4.0.0
 * @category serialization
 */
export declare const jsonRpc: (options?: {
    readonly contentType?: string | undefined;
}) => RpcSerialization["Service"];
/**
 * @since 4.0.0
 * @category serialization
 */
export declare const ndJsonRpc: (options?: {
    readonly contentType?: string | undefined;
}) => RpcSerialization["Service"];
/**
 * Create a MessagePack serialization with custom msgpackr options.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const makeMsgPack: (options?: Msgpackr.Options | undefined) => RpcSerialization["Service"];
/**
 * @since 4.0.0
 * @category serialization
 */
export declare const msgPack: RpcSerialization["Service"];
/**
 * A rpc serialization layer that uses JSON for serialization.
 *
 * Use this if your protocol supports framing for messages, otherwise use
 * {@link layerNdjson}.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const layerJson: Layer.Layer<RpcSerialization>;
/**
 * A rpc serialization layer that uses NDJSON for serialization.
 *
 * Use this if your protocol does not support framing for messages, otherwise
 * use {@link layerJson}.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const layerNdjson: Layer.Layer<RpcSerialization>;
/**
 * A rpc serialization layer that uses JSON-RPC for serialization.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const layerJsonRpc: (options?: {
    readonly contentType?: string | undefined;
}) => Layer.Layer<RpcSerialization>;
/**
 * A rpc serialization layer that uses JSON-RPC for serialization seperated by
 * new lines.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const layerNdJsonRpc: (options?: {
    readonly contentType?: string | undefined;
}) => Layer.Layer<RpcSerialization>;
/**
 * A rpc serialization layer that uses MessagePack for serialization.
 *
 * MessagePack has a more compact binary format compared to JSON and NDJSON. It
 * also has better support for binary data.
 *
 * @since 4.0.0
 * @category serialization
 */
export declare const layerMsgPack: Layer.Layer<RpcSerialization>;
export {};
//# sourceMappingURL=RpcSerialization.d.ts.map