pub struct ServerConfig {Show 20 fields
pub workspace_root: PathBuf,
pub screenshot_dir: PathBuf,
pub path_mappings: Vec<PathMapping>,
pub cache_capacity: usize,
pub supported_extensions: Vec<String>,
pub single_workbook: Option<PathBuf>,
pub enabled_tools: Option<HashSet<String>>,
pub transport: TransportKind,
pub http_bind_address: SocketAddr,
pub recalc_enabled: bool,
pub recalc_backend: RecalcBackendKind,
pub vba_enabled: bool,
pub max_concurrent_recalcs: usize,
pub tool_timeout_ms: Option<u64>,
pub max_response_bytes: Option<u64>,
pub output_profile: OutputProfile,
pub max_payload_bytes: Option<u64>,
pub max_cells: Option<u64>,
pub max_items: Option<u64>,
pub allow_overwrite: bool,
}Fields§
§workspace_root: PathBuf§screenshot_dir: PathBufDirectory to write screenshot PNGs into (screenshot_sheet).
path_mappings: Vec<PathMapping>Optional mapping from server-internal paths to client/host-visible paths. This is primarily useful when the server runs in Docker and volumes are mounted.
cache_capacity: usize§supported_extensions: Vec<String>§single_workbook: Option<PathBuf>§enabled_tools: Option<HashSet<String>>§transport: TransportKind§http_bind_address: SocketAddr§recalc_enabled: bool§recalc_backend: RecalcBackendKind§vba_enabled: bool§max_concurrent_recalcs: usize§tool_timeout_ms: Option<u64>§max_response_bytes: Option<u64>§output_profile: OutputProfile§max_payload_bytes: Option<u64>§max_cells: Option<u64>§max_items: Option<u64>§allow_overwrite: boolImplementations§
Source§impl ServerConfig
impl ServerConfig
pub fn from_args(args: CliArgs) -> Result<Self>
pub fn ensure_workspace_root(&self) -> Result<()>
pub fn map_path_for_client<P: AsRef<Path>>( &self, internal_path: P, ) -> Option<PathBuf>
pub fn map_path_from_client<P: AsRef<Path>>( &self, client_path: P, ) -> Option<PathBuf>
Sourcepub fn resolve_user_path<P: AsRef<Path>>(&self, p: P) -> PathBuf
pub fn resolve_user_path<P: AsRef<Path>>(&self, p: P) -> PathBuf
Resolve a user-supplied path for tools (e.g. save_fork target_path).
- If the path is absolute and matches a configured client path mapping, map it to internal.
- Otherwise, treat absolute paths as internal.
- Relative paths are resolved under workspace_root.
pub fn resolve_path<P: AsRef<Path>>(&self, relative: P) -> PathBuf
pub fn single_workbook(&self) -> Option<&Path>
pub fn is_tool_enabled(&self, tool: &str) -> bool
pub fn tool_timeout(&self) -> Option<Duration>
pub fn max_response_bytes(&self) -> Option<usize>
pub fn output_profile(&self) -> OutputProfile
pub fn max_payload_bytes(&self) -> Option<usize>
pub fn max_cells(&self) -> Option<usize>
pub fn max_items(&self) -> Option<usize>
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 moreAuto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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