[][src]Struct crev_lib::local::Local

pub struct Local { /* fields omitted */ }

Local config stored in ~/.config/crev

This managed IDs, local proof repository, etc.

Methods

impl Local[src]

pub fn get_root_cache_dir(&self) -> &Path[src]

pub fn auto_open() -> Result<Self>[src]

pub fn auto_create() -> Result<Self>[src]

pub fn auto_create_or_open() -> Result<Self>[src]

pub fn read_current_id(&self) -> Result<Id>[src]

pub fn read_current_id_opt(&self) -> Result<Option<Id>>[src]

pub fn get_for_id_from_str_opt(
    &self,
    id_str: Option<&str>
) -> Result<Option<Id>>
[src]

Calculate for_id that is used in a lot of operations

  • if id_str is given - convert to Id
  • otherwise return current id

pub fn get_for_id_from_str(&self, id_str: Option<&str>) -> Result<Id>[src]

pub fn save_current_id(&self, id: &Id) -> Result<()>[src]

pub fn user_dir_path(&self) -> PathBuf[src]

pub fn user_ids_path(&self) -> PathBuf[src]

pub fn user_proofs_path(&self) -> PathBuf[src]

pub fn list_ids(&self) -> Result<Vec<PubId>>[src]

pub fn cache_remotes_path(&self) -> PathBuf[src]

pub fn record_review_activity(
    &self,
    source: &str,
    name: &str,
    version: &Version,
    activity: &ReviewActivity
) -> Result<()>
[src]

pub fn read_review_activity(
    &self,
    source: &str,
    name: &str,
    version: &Version
) -> Result<Option<ReviewActivity>>
[src]

pub fn load_user_config(&self) -> Result<UserConfig>[src]

pub fn store_user_config(&self, config: &UserConfig) -> Result<()>[src]

pub fn get_current_userid(&self) -> Result<Id>[src]

pub fn get_current_userid_opt(&self) -> Result<Option<Id>>[src]

pub fn read_locked_id(&self, id: &Id) -> Result<LockedId>[src]

pub fn read_current_locked_id_opt(&self) -> Result<Option<LockedId>>[src]

pub fn read_current_locked_id(&self) -> Result<LockedId>[src]

pub fn read_current_unlocked_id_opt(
    &self,
    passphrase_callback: PassphraseFn
) -> Result<Option<OwnId>>
[src]

pub fn read_current_unlocked_id(
    &self,
    passphrase_callback: PassphraseFn
) -> Result<OwnId>
[src]

pub fn read_unlocked_id(
    &self,
    id: &Id,
    passphrase_callback: PassphraseFn
) -> Result<OwnId>
[src]

pub fn save_locked_id(&self, id: &LockedId) -> Result<()>[src]

pub fn clone_proof_dir_from_git(
    &self,
    git_https_url: &str,
    use_https_push: bool
) -> Result<()>
[src]

Git clone or init new remote Github crev-proof repo

pub fn init_repo_readme_using_template(&self) -> Result<()>[src]

pub fn get_proofs_dir_path_for_url(&self, url: &Url) -> Result<PathBuf>[src]

pub fn get_proofs_dir_path_opt(&self) -> Result<Option<PathBuf>>[src]

pub fn get_proofs_dir_path(&self) -> Result<PathBuf>[src]

pub fn build_trust_proof(
    &self,
    from_id: &PubId,
    id_strings: Vec<String>,
    trust_or_distrust: TrustProofType
) -> Result<Trust>
[src]

pub fn fetch_url(&self, url: &str) -> Result<()>[src]

pub fn fetch_trusted(
    &self,
    trust_params: TrustDistanceParams,
    for_id: Option<&str>
) -> Result<()>
[src]

pub fn get_remote_git_cache_path(&self, url: &str) -> Result<PathBuf>[src]

pub fn fetch_remote_git(&self, url: &str) -> Result<PathBuf>[src]

Fetch a git proof repository

Returns url where it was cloned/fetched

pub fn fetch_proof_repo_import_and_print_counts(
    &self,
    url: &str,
    db: &mut ProofDB
) -> Option<PathBuf>
[src]

pub fn fetch_all(&self) -> Result<()>[src]

pub fn run_git(&self, args: Vec<OsString>) -> Result<ExitStatus>[src]

pub fn edit_readme(&self) -> Result<()>[src]

pub fn edit_user_config(&self) -> Result<()>[src]

pub fn store_config_open_cmd(&self, cmd: String) -> Result<()>[src]

pub fn load_db(&self) -> Result<ProofDB>[src]

Create a new proofdb, and populate it with local repo and cache content.

pub fn proof_dir_git_add_path(&self, rel_path: &Path) -> Result<()>[src]

pub fn proof_dir_commit(&self, commit_msg: &str) -> Result<()>[src]

pub fn show_current_id(&self) -> Result<()>[src]

pub fn generate_id(
    &self,
    url: Option<String>,
    github_username: Option<String>,
    use_https_push: bool
) -> Result<()>
[src]

pub fn switch_id(&self, id_str: &str) -> Result<()>[src]

pub fn list_own_ids(&self) -> Result<()>[src]

pub fn show_own_ids(&self) -> Result<()>[src]

pub fn export_locked_id(&self, id_str: Option<String>) -> Result<String>[src]

pub fn import_locked_id(&self, locked_id_serialized: &str) -> Result<PubId>[src]

Trait Implementations

impl ProofStore for Local[src]

Auto Trait Implementations

impl Send for Local

impl !Sync for Local

impl Unpin for Local

impl UnwindSafe for Local

impl !RefUnwindSafe for Local

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,