pub struct Route {
pub url: &'static str,
pub file: usize,
pub cache_control: Option<&'static str>,
}Expand description
A served URL mapped to the file that answers it and the Cache-Control to send.
One generated file produces one route: its hashed_url for
ordinary assets, or its plain url for assets in an immutable_dir.
Generated at build time and sorted by url for binary search; you do not construct these by
hand outside of tests.
Fields§
§url: &'static strThe served URL this route matches.
file: usizeIndex into the Assets file slice of the file that answers this URL.
cache_control: Option<&'static str>The Cache-Control value to send. Generated routes use
Some(IMMUTABLE_CACHE_CONTROL) because every served generated URL is immutable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more