pub struct DirectoryListingAssetsController;Expand description
Serves the CSS/JS assets for the directory listing page generated by
crate::app::controller::static_resource::StaticResourceController.
These are same-origin <link>/<script src> assets rather than inline
<style>/<script> blocks so the listing page renders correctly under
the framework’s default Content-Security-Policy: default-src 'self' —
inline blocks would otherwise be silently blocked by that policy.
Mirrors StyleController /
ScriptController:
a file on disk at the same relative path overrides the compiled-in default,
so deployments can restyle the listing without recompiling.
Implementations§
Source§impl DirectoryListingAssetsController
impl DirectoryListingAssetsController
pub const CSS_FILEPATH: &'static str = "rws-directory-listing.css"
pub const JS_FILEPATH: &'static str = "rws-directory-listing.js"
Trait Implementations§
Source§impl Controller for DirectoryListingAssetsController
impl Controller for DirectoryListingAssetsController
Source§fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
fn is_matching(request: &Request, _connection: &ConnectionInfo) -> bool
Returns
true if this controller should handle the given request.
Called in declaration order; the first match wins.Auto Trait Implementations§
impl Freeze for DirectoryListingAssetsController
impl RefUnwindSafe for DirectoryListingAssetsController
impl Send for DirectoryListingAssetsController
impl Sync for DirectoryListingAssetsController
impl Unpin for DirectoryListingAssetsController
impl UnsafeUnpin for DirectoryListingAssetsController
impl UnwindSafe for DirectoryListingAssetsController
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