it
    Preparing search index...

    Interface ProtobufStream<Stream>

    Convenience methods for working with protobuf streams

    interface ProtobufStream<Stream = unknown> {
        pb<T>(
            proto: { decode: Decoder<T>; encode: Encoder<T> },
        ): MessageStream<T, Stream>;
        read<T>(proto: { decode: Decoder<T> }, options?: AbortOptions): Promise<T>;
        unwrap(): Stream;
        write<T>(
            data: T,
            proto: { encode: Encoder<T> },
            options?: AbortOptions,
        ): Promise<void>;
        writeV<T>(
            input: T[],
            proto: { encode: Encoder<T> },
            options?: AbortOptions,
        ): Promise<void>;
    }

    Type Parameters

    • Stream = unknown
    Index

    Methods