Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/batteredbunny/url_parser
Rust macro that parses url arguments into a struct for easy usage
https://github.com/batteredbunny/url_parser
Last synced: 21 days ago
JSON representation
Rust macro that parses url arguments into a struct for easy usage
- Host: GitHub
- URL: https://github.com/batteredbunny/url_parser
- Owner: BatteredBunny
- Created: 2023-05-18T20:02:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-07T11:17:16.000Z (6 months ago)
- Last Synced: 2024-05-07T12:33:20.976Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
URL Arguments parser
## Rust macro that parses url arguments into a struct for easy usage
# Install
```
cargo add --git https://github.com/BatteredBunny/url_parser
```# Usage
## You can add multiple URLs, it will add flags from all of them```rust
#[macro_use]
extern crate url_parser;#[parse_url("https://nyaa.si/?f=0&c=1_0&q=q&u", "https://nyaa.si/?s=comments", "https://nyaa.si/?p=100", "https://nyaa.si/?page=rss")]
struct ParsedURL {}
```↓↓↓↓↓↓↓↓↓↓
```rust
struct ParsedURL {
pub f: String,
pub page: String,
pub u: Option,
pub q: String,
pub s: String,
pub p: String,
pub c: String,
}
```