serde_shon 0.1.0

SHON serialization and deserialization support in Rust
Documentation
  • Coverage
  • 10%
    1 out of 10 items documented0 out of 0 items with examples
  • Size
  • Source code size: 30.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • chaosteil/serde_shon
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • chaosteil

serde_shon

Crates.io GitHub Workflow Status

serde_shon is a Rust library for parsing the SHON data format. The definition of the format is based on the description present in shon-go.

This library is intended to be used with Serde.

Installation

Include the library as part of the dependencies in Cargo.toml:

[dependencies]
serde_shon = "0.1.0"

Usage

use serde::Deserialize;
use serde_shon::from_args;
use std::env;

#[derive(Deserialize, Debug)]
struct Data {
    field: Option<String>,
}

fn main() {
    let d: Data = from_args(env::args()).unwrap();
    dbg!(d.field);
}

Features

The serializer supports common Rust data types for serialization and deserialization, like enums and structs.

The library might currently still have a few bugs and be incomplete in the implementation. If you find something troubling, either write up an issue or perhaps even a PR, contributions are always welcome.