Crate beve

Crate beve 

Source
Expand description

BEVE - Binary Efficient Versatile Encoding

High-performance, tagged binary format designed for scientific computing. This crate provides a robust, fast, and ergonomic implementation with serde support.

  • Little-endian encoding
  • Direct struct serialization via serde::{Serialize, Deserialize}
  • Typed arrays for numeric, boolean, and string sequences when possible
  • Object keys as strings or integer types
  • Enum support via BEVE type-tag extension

Example

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Point { x: f64, y: f64 }

let p = Point { x: 1.0, y: -2.0 };
let bytes = beve::to_vec(&p).unwrap();
let p2: Point = beve::from_slice(&bytes).unwrap();
assert_eq!(p, p2);

Re-exports§

pub use crate::fast::to_vec_bool_slice;
pub use crate::fast::to_vec_complex32;
pub use crate::fast::to_vec_complex32_slice;
pub use crate::fast::to_vec_complex64;
pub use crate::fast::to_vec_complex64_slice;
pub use crate::fast::to_vec_str_slice;
pub use crate::fast::to_vec_string_slice;
pub use crate::fast::to_vec_typed_slice;
pub use crate::fast::write_bool_slice;
pub use crate::fast::write_str_slice;
pub use crate::fast::write_string_slice;
pub use crate::fast::write_typed_slice;
pub use crate::fast::BeveTypedSlice;

Modules§

fast
util
BEVE-specific utilities and helper types.

Structs§

Complex
ComplexSlice
Deserializer
Matrix
Serializer
SerializerOptions

Enums§

EnumEncoding
Error
MatrixLayout

Functions§

from_reader
Deserialize a value by reading all bytes from a reader into a buffer first.
from_slice
to_vec
to_vec_with_options
to_writer
Serialize a value to any writer. For unknown-length containers, this uses an internal buffer.
to_writer_with_options
Serialize a value to any writer with custom options.

Type Aliases§

Result