[][src]Trait asciii::storage::storable::Storable

pub trait Storable: Send + Sync {
    fn open_folder(_: &FolderPath) -> StorageResult<Self>
    where
        Self: Sized
;
fn open_file(_: &FilePath) -> StorageResult<Self>
    where
        Self: Sized
;
fn from_template(
        project_name: &str,
        template: &Path,
        data: &HashMap<&str, String>
    ) -> StorageResult<StorableAndTempDir<Self>>
    where
        Self: Sized
;
fn short_desc(&self) -> String;
fn modified_date(&self) -> Option<Date<Utc>>;
fn index(&self) -> Option<String>;
fn prefix(&self) -> Option<String>;
fn set_file(&mut self, new_file: &Path);
fn file(&self) -> FilePathBuf;
fn matches_filter(&self, key: &str, val: &str) -> bool;
fn matches_search(&self, term: &str) -> bool;
fn is_ready_for_archive(&self) -> bool; fn ident(&self) -> String { ... }
fn year(&self) -> Option<i32> { ... }
fn delete_project_dir_if(
        &self,
        confirmed: impl Fn() -> bool
    ) -> Result<()> { ... }
fn set_git_status(&mut self, _: GitStatus) { ... }
fn get_git_status(&self) -> GitStatus { ... }
fn file_extension() -> String { ... }
fn file_name(&self) -> String { ... }
fn dir(&self) -> FolderPathBuf { ... } }

Required Methods

opens a projectfolder

creates in tempfile

For sorting

For archiving

Sets the project File

Path to project file

Provided Methods

For file names

Deletes the project if the passed in closure returns true

Tell a project its own git status after opening

This depoends on the feature git_statuses

Ask a project for its gitstatus

This depoends on the feature git_statuses

Main Projectfile extension

Filename as fallback

Path to project folder

Implementors

impl Storable for Project
[src]

Ask a project for its gitstatus

Opens a yaml and parses it.

Checks against a certain key-val pair.

UNIMPLEMENTED: Checks against a certain search term.

TODO compare agains InvoiceNumber, ClientFullName, Email, event/name, invoice/official Etc