Suika Utils
Suika Utils is a utility library for the Suika web stack, providing essential tools and helpers.
Note: Suika is under active development and not intended for production use. The API is subject to change and may lack comprehensive testing and documentation.
Installation
Add suika_utils to your Cargo.toml:
[]
= "0.1.0"
Usage
Parsing Query Strings
Use the parse_query_string function to parse a query string into a HashMap:
use parse_query_string;
let query = "name=John&age=30";
let params = parse_query_string;
assert_eq!;
assert_eq!;
Building URLs
Use the build_url function to build a URL from a base and query parameters:
use build_url;
let base = "https://example.com";
let mut params = new;
params.insert;
params.insert;
let url = build_url;
assert_eq!;
Parsing URLs
Use the parse_url function to parse a URL into its components:
use parse_url;
let url = "https://example.com/path?name=John&age=30";
let components = parse_url.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Creating No-Op Wakers
Use the noop_waker function to create a no-op waker for use in tests:
use noop_waker;
use ;
use Future;
use Pin;
use ;
let waker = noop_waker;
let mut cx = from_waker;
let ready = new;
let ready_clone = clone;
let mut future = Boxpin;
assert!;
let _ = future.as_mut.poll;
assert!;