memory_serve_core/
asset.rs1use std::path::PathBuf;
2
3pub struct Asset {
5 pub route: String,
6 pub path: PathBuf,
7 pub etag: String,
8 pub content_type: String,
9 pub compressed_bytes: Option<Vec<u8>>,
10}
11
12impl PartialEq for Asset {
13 fn eq(&self, other: &Self) -> bool {
14 self.route == other.route
15 }
16}
17
18impl Eq for Asset {}
19
20impl PartialOrd for Asset {
21 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
22 Some(self.cmp(other))
23 }
24}
25
26impl Ord for Asset {
27 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
28 self.route.cmp(&other.route)
29 }
30}