pub struct DistriServerConfig {Show 16 fields
pub name: String,
pub version: String,
pub description: Option<String>,
pub license: Option<String>,
pub agents: Option<Vec<String>>,
pub entrypoints: Option<EntryPoints>,
pub distri: Option<EngineConfig>,
pub authors: Option<AuthorsConfig>,
pub registry: Option<RegistryConfig>,
pub mcp_servers: Option<Vec<ExternalMcpServer>>,
pub server: Option<ServerConfig>,
pub model_settings: Option<ModelSettings>,
pub analysis_model_settings: Option<ModelSettings>,
pub keywords: Option<Vec<String>>,
pub stores: Option<StoreConfig>,
pub filesystem: Option<ObjectStorageConfig>,
}Expand description
User configuration from distri.toml file
Fields§
§name: String§version: String§description: Option<String>§license: Option<String>§agents: Option<Vec<String>>§entrypoints: Option<EntryPoints>§distri: Option<EngineConfig>§registry: Option<RegistryConfig>§mcp_servers: Option<Vec<ExternalMcpServer>>§server: Option<ServerConfig>§model_settings: Option<ModelSettings>§analysis_model_settings: Option<ModelSettings>§keywords: Option<Vec<String>>§stores: Option<StoreConfig>§filesystem: Option<ObjectStorageConfig>Optional filesystem/object storage configuration for workspace/session files
Implementations§
Source§impl DistriServerConfig
impl DistriServerConfig
pub fn has_entrypoints(&self) -> bool
Source§impl DistriServerConfig
impl DistriServerConfig
Sourcepub fn get_working_directory(&self) -> Result<PathBuf>
pub fn get_working_directory(&self) -> Result<PathBuf>
Get the working directory with fallback chain: config -> DISTRI_HOME -> current_dir
pub async fn load_from_path<P: AsRef<Path>>(path: P) -> Result<Self>
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate that the manifest has at least one of agents or entrypoints
pub async fn save_to_path<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn new_minimal(package_name: String) -> Self
pub fn current_dir() -> Result<PathBuf>
pub fn find_configuration_in_current_dir() -> Result<PathBuf>
Trait Implementations§
Source§impl Clone for DistriServerConfig
impl Clone for DistriServerConfig
Source§fn clone(&self) -> DistriServerConfig
fn clone(&self) -> DistriServerConfig
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 moreSource§impl Debug for DistriServerConfig
impl Debug for DistriServerConfig
Source§impl Default for DistriServerConfig
impl Default for DistriServerConfig
Source§fn default() -> DistriServerConfig
fn default() -> DistriServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DistriServerConfig
impl<'de> Deserialize<'de> for DistriServerConfig
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 DistriServerConfig
impl RefUnwindSafe for DistriServerConfig
impl Send for DistriServerConfig
impl Sync for DistriServerConfig
impl Unpin for DistriServerConfig
impl UnsafeUnpin for DistriServerConfig
impl UnwindSafe for DistriServerConfig
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