cdumay_core

Crates.iocdumay_core
lib.rscdumay_core
version0.0.1
sourcesrc
created_at2024-07-17 13:35:34.824894
updated_at2024-07-17 13:35:34.824894
descriptionBundle of utils
homepagehttps://github.com/cdumay/rust-cdumay_core
repositoryhttps://github.com/cdumay/rust-cdumay_core
max_upload_size
id1306181
size6,492
Cédric Dumay (cdumay)

documentation

https://docs.rs/cdumay_core

README

cdumay_core License: BSD-3-Clause cdumay_core on crates.io cdumay_core on docs.rs Source Code Repository

cdumay_core is a bundle of tools used by other libraries.

Quickstart

Cargo.toml:

[dependencies]
cdumay_core = "0.3"
serde_json = "1.0"

main.rs:

extern crate cdumay_core;
extern crate serde_json;

use cdumay_core::{Value, Uuid};

fn main() {
    let data = r#"
        {
            "name": "John Doe",
            "age": 43
        }"#;
    let v: Value = serde_json::from_str(data).unwrap();
    assert_eq!(v["name"], "John Doe");
    assert_eq!(v["age"], 43);
    let uuid = Uuid::new_v4();
    println!("{}", serde_json::to_string_pretty(&uuid).unwrap());
}
Commit count: 0

cargo fmt