pub struct ContextReaderWriter { /* private fields */ }Implementations§
Source§impl ContextReaderWriter
impl ContextReaderWriter
pub fn from_env() -> Self
pub fn new(iggy_home: Option<PathBuf>) -> Self
pub async fn read_contexts(&self) -> Result<Option<ContextsConfigMap>>
pub async fn write_contexts(&self, contexts: ContextsConfigMap) -> Result<()>
pub async fn read_active_context(&self) -> Result<Option<String>>
pub async fn write_active_context(&self, context_name: &str) -> Result<()>
pub async fn ensure_iggy_home_exists(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextReaderWriter
impl RefUnwindSafe for ContextReaderWriter
impl Send for ContextReaderWriter
impl Sync for ContextReaderWriter
impl Unpin for ContextReaderWriter
impl UnsafeUnpin for ContextReaderWriter
impl UnwindSafe for ContextReaderWriter
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> 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