pub struct AssetRegistry { /* private fields */ }Expand description
Extensible asset registry allowing v2.0 (e.g. Kinetic Graph assets) to mount
additional embedded assets without modifying CORE_ASSETS.
Implementations§
Source§impl AssetRegistry
impl AssetRegistry
pub fn with_core() -> Self
pub fn register(&mut self, asset: EmbeddedAsset) -> &mut Self
pub fn find(&self, path: &str) -> Option<&EmbeddedAsset>
Sourcepub fn serve(&self, req: &HttpRequest) -> Option<HttpResponse>
pub fn serve(&self, req: &HttpRequest) -> Option<HttpResponse>
Serve a matching GET or HEAD asset with ETag / 304 Not Modified and Cache-Control.
Trait Implementations§
Source§impl Clone for AssetRegistry
impl Clone for AssetRegistry
Source§impl Debug for AssetRegistry
impl Debug for AssetRegistry
Auto Trait Implementations§
impl Forget for AssetRegistry
impl Freeze for AssetRegistry
impl Move for AssetRegistry
impl RefUnwindSafe for AssetRegistry
impl Send for AssetRegistry
impl Sync for AssetRegistrywhere
RawVecInner: Sync,
impl Unpin for AssetRegistry
impl UnsafeUnpin for AssetRegistry
impl UnwindSafe for AssetRegistry
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