pub struct ResolvedServerConfig {
pub url: Option<String>,
pub api_key: Option<String>,
pub project: Option<String>,
pub fallback_to_local: bool,
}Expand description
Resolved server configuration with all sources merged.
Fields§
§url: Option<String>§api_key: Option<String>§project: Option<String>§fallback_to_local: boolImplementations§
Source§impl ResolvedServerConfig
impl ResolvedServerConfig
Sourcepub fn is_configured(&self) -> bool
pub fn is_configured(&self) -> bool
Returns true if server is configured (has a URL).
Sourcepub fn create_client(&self) -> Result<Option<BaselineClient>>
pub fn create_client(&self) -> Result<Option<BaselineClient>>
Creates a BaselineClient from this configuration.
Sourcepub fn create_fallback_client(
&self,
fallback_dir: Option<&Path>,
) -> Result<Option<FallbackClient>>
pub fn create_fallback_client( &self, fallback_dir: Option<&Path>, ) -> Result<Option<FallbackClient>>
Creates a FallbackClient if fallback is enabled and server is configured.
Sourcepub fn require_fallback_client(
&self,
fallback_dir: Option<&Path>,
error_msg: &str,
) -> Result<FallbackClient>
pub fn require_fallback_client( &self, fallback_dir: Option<&Path>, error_msg: &str, ) -> Result<FallbackClient>
Returns a baseline client for server operations, or an error if not configured.
Trait Implementations§
Source§impl Clone for ResolvedServerConfig
impl Clone for ResolvedServerConfig
Source§fn clone(&self) -> ResolvedServerConfig
fn clone(&self) -> ResolvedServerConfig
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 ResolvedServerConfig
impl Debug for ResolvedServerConfig
Source§impl Default for ResolvedServerConfig
impl Default for ResolvedServerConfig
Source§fn default() -> ResolvedServerConfig
fn default() -> ResolvedServerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResolvedServerConfig
impl RefUnwindSafe for ResolvedServerConfig
impl Send for ResolvedServerConfig
impl Sync for ResolvedServerConfig
impl Unpin for ResolvedServerConfig
impl UnsafeUnpin for ResolvedServerConfig
impl UnwindSafe for ResolvedServerConfig
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