bellande_format 0.0.2

Bellande File Format
Documentation
  • Coverage
  • 0%
    0 out of 18 items documented0 out of 10 items with examples
  • Size
  • Source code size: 9.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • RonaldsonBellande

Bellande Format Rust Example

use std::collections::HashMap;
use bellande::{BellandeFormat, BellandeValue};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a BellandeFormat instance
    let bellande_formatter = BellandeFormat;

    // Parse a Bellande file
    let parsed_data = bellande_formatter.parse_bellande("path/to/your/file.bellande")?;
    println!("{:#?}", parsed_data);

    // Create data to write
    let mut data_to_write = HashMap::new();
    data_to_write.insert("key".to_string(), BellandeValue::String("value".to_string()));
    data_to_write.insert("list".to_string(), BellandeValue::List(vec![
        BellandeValue::Integer(1),
        BellandeValue::Integer(2),
        BellandeValue::Integer(3),
    ]));
    let bellande_value = BellandeValue::Map(data_to_write);

    // Write data to a Bellande file
    bellande_formatter.write_bellande(&bellande_value, "path/to/output/file.bellande")?;

    Ok(())
}

Website NPM

Installation

  • cargo add bellande_format
Name: bellande_format
Version: 0.1.0
Summary: File type Formats
Home-page: github.com/RonaldsonBellande/bellande_format
Author: Ronaldson Bellande
Author-email: ronaldsonbellande@gmail.com
License: GNU General Public License v3.0

License

This Algorithm or Models is distributed under the Creative Commons Attribution-ShareAlike 4.0 International License, see LICENSE and NOTICE for more information.