pub struct BaselineServerConfig {
pub url: Option<String>,
pub api_key: Option<String>,
pub project: Option<String>,
pub fallback_to_local: bool,
}Expand description
Configuration for the baseline server connection.
When configured, the CLI can use a centralized baseline server for storing and retrieving baselines instead of local files.
§Examples
[baseline_server]
url = "http://localhost:3000/api/v1"
api_key = "pg_live_xxx"
project = "my-project"
fallback_to_local = trueFields§
§url: Option<String>URL of the baseline server (e.g., “http://localhost:3000/api/v1”).
api_key: Option<String>API key for authentication.
project: Option<String>Project name for multi-tenancy.
fallback_to_local: boolFall back to local storage when server is unavailable.
Implementations§
Source§impl BaselineServerConfig
impl BaselineServerConfig
Sourcepub fn is_configured(&self) -> bool
pub fn is_configured(&self) -> bool
Returns true if server is configured (has a URL).
Sourcepub fn resolved_url(&self) -> Option<String>
pub fn resolved_url(&self) -> Option<String>
Resolves the server URL from config or environment variable.
Sourcepub fn resolved_api_key(&self) -> Option<String>
pub fn resolved_api_key(&self) -> Option<String>
Resolves the API key from config or environment variable.
Sourcepub fn resolved_project(&self) -> Option<String>
pub fn resolved_project(&self) -> Option<String>
Resolves the project name from config or environment variable.
Trait Implementations§
Source§impl Clone for BaselineServerConfig
impl Clone for BaselineServerConfig
Source§fn clone(&self) -> BaselineServerConfig
fn clone(&self) -> BaselineServerConfig
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 BaselineServerConfig
impl Debug for BaselineServerConfig
Source§impl Default for BaselineServerConfig
impl Default for BaselineServerConfig
Source§fn default() -> BaselineServerConfig
fn default() -> BaselineServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BaselineServerConfig
impl<'de> Deserialize<'de> for BaselineServerConfig
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
Source§impl JsonSchema for BaselineServerConfig
impl JsonSchema for BaselineServerConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for BaselineServerConfig
impl PartialEq for BaselineServerConfig
Source§impl Serialize for BaselineServerConfig
impl Serialize for BaselineServerConfig
impl StructuralPartialEq for BaselineServerConfig
Auto Trait Implementations§
impl Freeze for BaselineServerConfig
impl RefUnwindSafe for BaselineServerConfig
impl Send for BaselineServerConfig
impl Sync for BaselineServerConfig
impl Unpin for BaselineServerConfig
impl UnsafeUnpin for BaselineServerConfig
impl UnwindSafe for BaselineServerConfig
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