pub struct SecureConfig { /* private fields */ }Expand description
A mechanism to access config files for a repo securely.
Implementations§
Source§impl SecureConfig
impl SecureConfig
Sourcepub fn new_repo(repo_dir: PathBuf) -> Self
pub fn new_repo(repo_dir: PathBuf) -> Self
Creates a secure config for a repo. Takes the .jj/repo directory.
Sourcepub fn new_workspace(workspace_dir: PathBuf) -> Self
pub fn new_workspace(workspace_dir: PathBuf) -> Self
Creates a secure config for a workspace. Takes the .jj directory.
Sourcepub fn maybe_load_config(
&self,
rng: &mut ChaCha20Rng,
root_config_dir: &Path,
) -> Result<LoadedSecureConfig, SecureConfigError>
pub fn maybe_load_config( &self, rng: &mut ChaCha20Rng, root_config_dir: &Path, ) -> Result<LoadedSecureConfig, SecureConfigError>
Determines the path to the config, and any metadata associated with it. If no config exists, the path will be None.
Sourcepub fn load_config(
&self,
rng: &mut ChaCha20Rng,
root_config_dir: &Path,
) -> Result<LoadedSecureConfig, SecureConfigError>
pub fn load_config( &self, rng: &mut ChaCha20Rng, root_config_dir: &Path, ) -> Result<LoadedSecureConfig, SecureConfigError>
Determines the path to the config, and any metadata associated with it. If no config exists, an empty config file will be generated.
Trait Implementations§
Source§impl Clone for SecureConfig
impl Clone for SecureConfig
Source§fn clone(&self) -> SecureConfig
fn clone(&self) -> SecureConfig
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 moreAuto Trait Implementations§
impl !Freeze for SecureConfig
impl !RefUnwindSafe for SecureConfig
impl Send for SecureConfig
impl !Sync for SecureConfig
impl Unpin for SecureConfig
impl UnwindSafe for SecureConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more