Reorganize
This commit is contained in:
8
crates/lib/assetserver/Cargo.toml
Normal file
8
crates/lib/assetserver/Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "assetserver"
|
||||
version = { workspace = true }
|
||||
rust-version = { workspace = true }
|
||||
edition = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
14
crates/lib/assetserver/src/lib.rs
Normal file
14
crates/lib/assetserver/src/lib.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
/// A static asset with compile-time embedded data.
|
||||
pub trait Asset {
|
||||
/// The common URL prefix for all assets (e.g., "/assets")
|
||||
const URL_PREFIX: &'static str;
|
||||
|
||||
/// The specific URL path for this asset (e.g., "/logo.png")
|
||||
const URL_POSTFIX: &'static str;
|
||||
|
||||
/// The full URL for this asset (e.g., "/assets/logo.png")
|
||||
const URL: &'static str;
|
||||
|
||||
/// The embedded file contents as a byte slice
|
||||
const BYTES: &'static [u8];
|
||||
}
|
||||
Reference in New Issue
Block a user