3 stable releases

1.0.2 Dec 25, 2024
1.0.1 Dec 2, 2024

#2605 in Parser implementations

Download history 149/week @ 2024-12-24 4/week @ 2025-01-07 1/week @ 2025-01-14 2/week @ 2025-02-11 8/week @ 2025-02-18

147 downloads per month

MIT license

44KB
1K SLoC

About

With this library you can create, update and delete strings and records from a URL.

Example Usage


use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
use url_handler::{FormatHandlerRegistry, ProtocolHandlerRegistry};

#[derive(Default, Clone, Eq, Hash, Debug, Serialize, Deserialize)]
struct TestStruct {
    last_updated: DateTime<Utc>,
    id: u32,
    name: String,
    is_pretty: bool,
}

let protocol_handlers = ProtocolHandlerRegistry::default();
let format_handlers = FormatHandlerRegistry::default();

let candidate: NestedStruct = build_record_from_url(&url, &protocol_handlers, &format_handlers)?;

Supported Formats

  • TOML
  • JSON

Supported Protocols

Next Steps

  • more formats
  • more protocols
  • more tests?

Dependencies

~35–50MB
~725K SLoC