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

pub struct Local { /* fields omitted */ }

Local config stored in ~/.config/crev

This managed IDs, local proof repository, etc.


impl Local[src]

pub fn get_root_path(&self) -> &Path[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(
    id_str: Option<&str>
) -> Result<Option<Id>>

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(
    source: &str,
    name: &str,
    version: &Version,
    activity: &ReviewActivity
) -> Result<()>

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

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(
    passphrase_callback: PassphraseFn
) -> Result<Option<OwnId>>

pub fn read_current_unlocked_id(
    passphrase_callback: PassphraseFn
) -> Result<OwnId>

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

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

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

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(
    from_id: &PubId,
    id_strings: Vec<String>,
    trust_or_distrust: TrustProofType
) -> Result<Trust>

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

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

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(
    url: &str,
    db: &mut ProofDB
) -> Option<PathBuf>

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(
    url: Option<String>,
    github_username: Option<String>,
    use_https_push: bool
) -> Result<()>

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 !RefUnwindSafe for Local

impl Send for Local

impl !Sync for Local

impl Unpin for Local

impl UnwindSafe for Local

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

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