Struct quartz_cli::context::Context
source · pub struct Context {
pub name: String,
pub variables: HashMap<String, String>,
}Fields§
§name: String§variables: HashMap<String, String>Implementations§
source§impl Context
impl Context
pub fn new(name: &str) -> Self
pub fn dir(&self) -> PathBuf
pub fn write(&self) -> Result<(), Box<dyn Error>>
pub fn update(&self) -> Result<(), Box<dyn Error>>
sourcepub fn exists(&self) -> bool
pub fn exists(&self) -> bool
Returns true if this context already exists on the quartz project.
pub fn parse(name: &str) -> Result<Self, Box<dyn Error>>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
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 RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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