pub struct RayConfig {
pub enabled: bool,
pub host: String,
pub port: NonZeroU16,
pub swallow_errors: bool,
pub project_name: Option<String>,
pub timeout_ms: NonZeroU64,
pub canonicalize_paths: bool,
pub send_meta: bool,
pub always_send_raw_values: bool,
pub local_path: Option<String>,
pub remote_path: Option<String>,
}Expand description
Runtime configuration for the Ray client.
Use load to combine defaults, ray.json, and environment overrides, or
load_strict/load_validated to surface invalid ray.json or env values.
Build a config directly when you want deterministic settings.
use ray::RayConfig;
let mut config = RayConfig::default();
config.enabled = false;
config.validate().unwrap();Fields§
§enabled: bool§host: String§port: NonZeroU16§swallow_errors: bool§project_name: Option<String>§timeout_ms: NonZeroU64§canonicalize_paths: bool§send_meta: bool§always_send_raw_values: bool§local_path: Option<String>§remote_path: Option<String>Implementations§
Source§impl RayConfig
impl RayConfig
Sourcepub fn load_validated() -> Result<Self, ConfigError>
pub fn load_validated() -> Result<Self, ConfigError>
Alias for load_strict().
Sourcepub fn load_strict() -> Result<Self, ConfigError>
pub fn load_strict() -> Result<Self, ConfigError>
Load configuration and return errors for invalid ray.json or env values.
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate the current configuration and return a ConfigError on failure.
Sourcepub fn from_env_strict() -> Result<Self, ConfigError>
pub fn from_env_strict() -> Result<Self, ConfigError>
Load configuration only from env and return errors for invalid values.
Sourcepub fn endpoint_url(&self) -> String
pub fn endpoint_url(&self) -> String
Return the Ray endpoint URL for sending payloads.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RayConfig
impl RefUnwindSafe for RayConfig
impl Send for RayConfig
impl Sync for RayConfig
impl Unpin for RayConfig
impl UnwindSafe for RayConfig
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