pub struct Config {
pub workspace_directory: String,
pub api_token: String,
pub curriculum_version: String,
}Fields§
§workspace_directory: String§api_token: String§curriculum_version: StringImplementations§
Source§impl Config
impl Config
pub fn new( workspace_directory: String, api_token: String, curriculum_version: String, ) -> Self
pub fn get_api_base_url(&self) -> String
pub fn get_environment(&self) -> Environment
pub fn get_curriculum_version(&self) -> &str
pub fn get_config_dir() -> Result<PathBuf, Box<dyn Error>>
pub fn get_config_path() -> Result<PathBuf, Box<dyn Error>>
pub fn save(&self) -> Result<(), Box<dyn Error>>
pub fn load() -> Result<Self, Box<dyn Error>>
pub fn exists() -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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