Skip to main content

Crate shape_wire

Crate shape_wire 

Source
Expand description

Shape Wire Format

Universal serialization format for Shape values with type metadata. This crate provides the data exchange format for:

  • REPL communication (engine <-> CLI)
  • fchart interoperability
  • Plugin data exchange
  • External tool integration

§Design Goals

  1. Fast: Uses MessagePack for compact binary serialization
  2. Type-aware: Carries type metadata for proper display/parsing
  3. Format-flexible: Supports multiple display formats per type
  4. Lossless: Raw values can be round-tripped without data loss

Re-exports§

pub use any_error::AnsiAnyErrorRenderer;
pub use any_error::AnyError;
pub use any_error::AnyErrorFrame;
pub use any_error::AnyErrorRenderer;
pub use any_error::HtmlAnyErrorRenderer;
pub use any_error::PlainAnyErrorRenderer;
pub use any_error::render_any_error_ansi;
pub use any_error::render_any_error_html;
pub use any_error::render_any_error_plain;
pub use any_error::render_any_error_terminal;
pub use any_error::render_any_error_with;
pub use codec::decode;
pub use codec::decode_message;
pub use codec::encode;
pub use codec::encode_message;
pub use codec::from_json;
pub use codec::from_json_string;
pub use codec::to_json;
pub use codec::to_json_string;
pub use codec::to_json_string_pretty;
pub use envelope::ValueEnvelope;
pub use error::Result;
pub use error::WireError;
pub use formatter::format_value;
pub use formatter::parse_value;
pub use metadata::FieldInfo;
pub use metadata::TypeInfo;
pub use metadata::TypeKind;
pub use metadata::TypeMetadata;
pub use metadata::TypeRegistry;
pub use print_result::WirePrintResult;
pub use print_result::WirePrintSpan;
pub use render::AnyErrorWireRenderAdapter;
pub use render::TerminalRenderCaps;
pub use render::WireRenderAdapter;
pub use render::WireRenderer;
pub use render::render_wire_html;
pub use render::render_wire_terminal;
pub use value::DurationUnit;
pub use value::WireColumn;
pub use value::WireTable;
pub use value::WireValue;

Modules§

any_error
Structured AnyError parsing and rendering.
codec
Encoding and decoding functions
content
Re-export content types used in WireValue::Content. Structured content nodes — the output of Content.render().
envelope
Value envelope - combines value with metadata
error
Error types for wire format operations
formatter
Value formatting implementation
metadata
Wire-format type metadata definitions
print_result
Wire print result - for terminal display
render
Unified wire-value rendering with extensible adapters.
transport
Transport abstraction for Shape inter-node communication.
value
Wire format value types

Enums§

ContentNode
Re-export content types used in WireValue::Content. A structured content node — the output of Content.render()

Constants§

WIRE_PROTOCOL_V1
Wire protocol version constant.
WIRE_PROTOCOL_V2
Wire protocol version 2: adds Execute, Validate, Auth, Ping/Pong messages and JSON framing support for lightweight clients.