pub struct ManifestStore {
data_dir: PathBuf,
cache: RwLock<CachedManifest>,
}Expand description
The published manifest, reloaded when manifest.json’s mtime changes.
Fields§
§data_dir: PathBuf§cache: RwLock<CachedManifest>Implementations§
Source§impl ManifestStore
impl ManifestStore
pub fn new(data_dir: impl Into<PathBuf>) -> Self
pub fn manifest_path(&self) -> PathBuf
Sourcepub fn current(&self) -> Manifest
pub fn current(&self) -> Manifest
A missing manifest is an empty one; an unreadable one keeps the last good copy serving, because a bad publish must not fail requests.
Sourcepub fn zip_path(
&self,
game: &str,
directory: &str,
name: &str,
) -> Option<(PackageInfo, PathBuf)>
pub fn zip_path( &self, game: &str, directory: &str, name: &str, ) -> Option<(PackageInfo, PathBuf)>
The zip behind a manifest entry; the URL’s game, directory and
name are only ever lookup keys, so nothing unlisted can resolve.
pub fn motd(&self, lang: &str) -> Option<String>
Auto Trait Implementations§
impl !Freeze for ManifestStore
impl RefUnwindSafe for ManifestStore
impl Send for ManifestStore
impl Sync for ManifestStore
impl Unpin for ManifestStore
impl UnsafeUnpin for ManifestStore
impl UnwindSafe for ManifestStore
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