pub struct Archival<F: FileSystemAPI> {
pub site: Site,
/* private fields */
}Fields§
§site: SiteImplementations§
source§impl<F: FileSystemAPI> Archival<F>
impl<F: FileSystemAPI> Archival<F>
pub fn is_compatible(fs: &F) -> Result<bool, Box<dyn Error>>
pub fn new(fs: F) -> Result<Self, Box<dyn Error>>
pub fn build(&self) -> Result<(), Box<dyn Error>>
pub fn dist_file(&self, path: &Path) -> Option<Vec<u8>>
pub fn object_exists( &self, obj_type: &str, filename: &str ) -> Result<bool, Box<dyn Error>>
pub fn object_path(&self, obj_type: &str, filename: &str) -> PathBuf
pub fn object_file( &self, obj_type: &str, filename: &str ) -> Result<String, Box<dyn Error>>
pub fn sha_for_file(&self, file: &Path) -> Result<String, Box<dyn Error>>
pub fn write_file( &self, obj_type: &str, filename: &str, contents: String ) -> Result<(), Box<dyn Error>>
pub fn send_event(&self, event: ArchivalEvent) -> Result<(), Box<dyn Error>>
pub fn get_objects( &self ) -> Result<HashMap<String, ObjectEntry>, Box<dyn Error>>
pub fn get_objects_sorted( &self, sort: impl Fn(&Object, &Object) -> Ordering ) -> Result<HashMap<String, ObjectEntry>, Box<dyn Error>>
pub fn modify_manifest( &mut self, modify: impl FnOnce(&mut Manifest) ) -> Result<(), Box<dyn Error>>
pub fn take_fs(self) -> F
Auto Trait Implementations§
impl<F> !Freeze for Archival<F>
impl<F> !RefUnwindSafe for Archival<F>
impl<F> Send for Archival<F>where
F: Send,
impl<F> !Sync for Archival<F>
impl<F> Unpin for Archival<F>
impl<F> UnwindSafe for Archival<F>
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