pub struct FilesystemMiniCdn { /* private fields */ }
Expand description
A collection of files loaded from the filesystem at runtime.
Implementations§
Source§impl FilesystemMiniCdn
impl FilesystemMiniCdn
Sourcepub fn new(root_path: Cow<'static, str>) -> FilesystemMiniCdn
pub fn new(root_path: Cow<'static, str>) -> FilesystemMiniCdn
References the files. Subsequent accesses will load from the file system relative to this path.
Sourcepub fn get(&self, path: &str) -> Option<MiniCdnFile>
pub fn get(&self, path: &str) -> Option<MiniCdnFile>
Loads a file from the corresponding directory.
Sourcepub fn iter(&self) -> impl Iterator<Item = (String, MiniCdnFile)>
pub fn iter(&self) -> impl Iterator<Item = (String, MiniCdnFile)>
Iterate files in the corresponding directory, without compressing.
Trait Implementations§
Source§impl Clone for FilesystemMiniCdn
impl Clone for FilesystemMiniCdn
Source§fn clone(&self) -> FilesystemMiniCdn
fn clone(&self) -> FilesystemMiniCdn
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FilesystemMiniCdn
impl Debug for FilesystemMiniCdn
Source§impl From<&FilesystemMiniCdn> for EmbeddedMiniCdn
impl From<&FilesystemMiniCdn> for EmbeddedMiniCdn
Source§fn from(filesystem: &FilesystemMiniCdn) -> EmbeddedMiniCdn
fn from(filesystem: &FilesystemMiniCdn) -> EmbeddedMiniCdn
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FilesystemMiniCdn
impl RefUnwindSafe for FilesystemMiniCdn
impl Send for FilesystemMiniCdn
impl Sync for FilesystemMiniCdn
impl Unpin for FilesystemMiniCdn
impl UnwindSafe for FilesystemMiniCdn
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