Struct minicdn::FilesystemMiniCdn
source · [−]pub struct FilesystemMiniCdn { /* private fields */ }
Expand description
A collection of files loaded from the filesystem at runtime.
Implementations
sourceimpl 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
sourceimpl Clone for FilesystemMiniCdn
impl Clone for FilesystemMiniCdn
sourcefn clone(&self) -> FilesystemMiniCdn
fn clone(&self) -> FilesystemMiniCdn
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'_> From<&FilesystemMiniCdn> for EmbeddedMiniCdn
impl<'_> From<&FilesystemMiniCdn> for EmbeddedMiniCdn
sourcefn from(filesystem: &FilesystemMiniCdn) -> EmbeddedMiniCdn
fn from(filesystem: &FilesystemMiniCdn) -> EmbeddedMiniCdn
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for FilesystemMiniCdn
impl Send for FilesystemMiniCdn
impl Sync for FilesystemMiniCdn
impl Unpin for FilesystemMiniCdn
impl UnwindSafe for FilesystemMiniCdn
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more