Wrapper around data that can represent a file - either in memory (cache), or on disk.
When getting a CachedFile
from the cache:
- An
InMemory
variant indicates that the file was read into the cache and a reference to that file is attached to the variant.
- A
FileSystem
variant indicates that the file is not in the cache, but it can be accessed from the filesystem.
- A
NotFound
variant indicates that the file can not be found in the filesystem or the cache.
A file that has been loaded into the cache.
A file that exists in the filesystem.
The file does not exist in either the cache or the filesystem.
A convenience function that wraps the getting of a cached file.
This is done to keep the code required to use the cache as similar to the typical use of
rocket::response::NamedFile.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Returns Ok
if a Response
could be generated successfully. Otherwise, returns an Err
with a failing Status
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
impl<T> Typeable for T where T: Any, | |
Get the TypeId
of this object.
impl<T> IntoCollection for T | |
Converts self
into a collection.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where A: Array<Item = U>, F: FnMut(T) -> U, | |
impl<T, I> AsResult for T where I: Input, | |