pub struct CodexRepoConfig { /* private fields */ }
Expand description
A CodexRepoConfig
is the parameters for making a CodexRepository.
Implementations§
Source§impl CodexRepoConfig
impl CodexRepoConfig
Sourcepub fn set_remote_url(&mut self, val: String) -> &mut Self
pub fn set_remote_url(&mut self, val: String) -> &mut Self
URL for the remote repository
Sourcepub fn set_path(&mut self, val: PathBuf) -> &mut Self
pub fn set_path(&mut self, val: PathBuf) -> &mut Self
where to put the files on disk (excluding the repo name)
Sourcepub fn set_auto_add(&mut self, val: Vec<String>) -> &mut Self
pub fn set_auto_add(&mut self, val: Vec<String>) -> &mut Self
paths to add automatically
Sourcepub fn set_ssh_keys(&mut self, val: SshKeys) -> &mut Self
pub fn set_ssh_keys(&mut self, val: SshKeys) -> &mut Self
SSH keys for the remote
Source§impl CodexRepoConfig
impl CodexRepoConfig
Sourcepub fn full_path(&self) -> Result<PathBuf>
pub fn full_path(&self) -> Result<PathBuf>
full_path
is the full path of the head of the repository on disk including the Self::repo_name()
Sourcepub fn has_repository(&self) -> Result<bool>
pub fn has_repository(&self) -> Result<bool>
has_repository
detects whether a CodexRepository exists for this CodexRepoConfig.
Sourcepub fn delete_repo(&self) -> Result<()>
pub fn delete_repo(&self) -> Result<()>
delete_repo
deletes the repository.
Sourcepub fn clone_repo(&mut self) -> Result<CodexRepository>
pub fn clone_repo(&mut self) -> Result<CodexRepository>
clone_repo
creates a CodexRepository and clones the repository from the remote (a Git clone, not a Rust clone).
Sourcepub fn open(&self) -> Result<CodexRepository>
pub fn open(&self) -> Result<CodexRepository>
open
opens an existing CodexRepository.
Trait Implementations§
Source§impl Clone for CodexRepoConfig
impl Clone for CodexRepoConfig
Source§fn clone(&self) -> CodexRepoConfig
fn clone(&self) -> CodexRepoConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CodexRepoConfig
impl Debug for CodexRepoConfig
Source§impl Default for CodexRepoConfig
impl Default for CodexRepoConfig
Source§fn default() -> CodexRepoConfig
fn default() -> CodexRepoConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodexRepoConfig
impl<'de> Deserialize<'de> for CodexRepoConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodexRepoConfig
impl RefUnwindSafe for CodexRepoConfig
impl Send for CodexRepoConfig
impl Sync for CodexRepoConfig
impl Unpin for CodexRepoConfig
impl UnwindSafe for CodexRepoConfig
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