pub struct Config {
pub memory: MemoryConfig,
pub repos: RepoConfig,
pub deploy: HashMap<String, DeployTarget>,
pub git: GitConfig,
}Expand description
Top-level dstack configuration.
Fields§
§memory: MemoryConfig§repos: RepoConfig§deploy: HashMap<String, DeployTarget>§git: GitConfigImplementations§
Source§impl Config
impl Config
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load configuration from ~/.config/dstack/config.toml. Returns defaults if the file does not exist.
Sourcepub fn memory_path(&self) -> PathBuf
pub fn memory_path(&self) -> PathBuf
Returns the memory path with ~ expanded to the user’s home directory.
Sourcepub fn eruka_service_key(&self) -> Option<String>
pub fn eruka_service_key(&self) -> Option<String>
Returns the Eruka service key. Checks $DSTACK_ERUKA_KEY env var first, falls back to config file value.
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 UnsafeUnpin 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