Skip to main content

reifydb_sub_server/
format.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4use serde::{Deserialize, Serialize};
5
6/// The three response formats the server can emit.
7///
8/// - `Json`  - rows-shape JSON: `[[{col: val, ...}, ...], ...]` (one inner array per frame)
9/// - `Frames` - frames-shape JSON: `{frames: [ResponseFrame, ...]}` with columnar payloads
10/// - `Rbcf`  - frames-shape binary, RBCF-encoded
11#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
12#[serde(rename_all = "lowercase")]
13pub enum WireFormat {
14	Json,
15	#[default]
16	Frames,
17	Rbcf,
18}