Crate waterui_url

Crate waterui_url 

Source
Expand description

§WaterUI URL Utilities

This crate provides ergonomic URL handling for the WaterUI framework, supporting both web URLs and local file paths with reactive fetching capabilities.

§Compile-Time URLs

URLs can be created at compile time using const evaluation:

use waterui_url::Url;

const LOGO: Url = Url::new("https://waterui.dev/logo.png");
const STYLESHEET: Url = Url::new("/styles/main.css");

§Runtime URLs

For dynamic URLs, use the FromStr trait:

use waterui_url::Url;

let url: Url = "https://example.com".parse()?;

Structs§

Fetched
A reactive signal for fetched URL content.
ParseError
Error type returned when URL parsing fails.
Url
A URL that can represent either a web URL or a local file path.

Enums§

UrlKind
The kind of URL.