pub struct UtcpClientConfig {
pub variables: HashMap<String, String>,
pub providers_file_path: Option<PathBuf>,
pub load_variables_from: Vec<Arc<dyn UtcpVariablesConfig>>,
}Expand description
Configuration for the UTCP client, including variables and provider file paths.
Fields§
§variables: HashMap<String, String>Map of inline variables.
providers_file_path: Option<PathBuf>Path to the providers configuration file.
load_variables_from: Vec<Arc<dyn UtcpVariablesConfig>>List of variable loaders to use.
Implementations§
Source§impl UtcpClientConfig
impl UtcpClientConfig
Sourcepub fn with_providers_file(self, path: PathBuf) -> Self
pub fn with_providers_file(self, path: PathBuf) -> Self
Sets the path to the providers configuration file.
Sourcepub fn with_variable(self, key: String, value: String) -> Self
pub fn with_variable(self, key: String, value: String) -> Self
Adds a single variable to the configuration.
Sourcepub fn with_variables(self, vars: HashMap<String, String>) -> Self
pub fn with_variables(self, vars: HashMap<String, String>) -> Self
Adds multiple variables to the configuration.
Sourcepub fn with_manual_path(self, path: PathBuf) -> Self
pub fn with_manual_path(self, path: PathBuf) -> Self
v1.0-style helper to set manual/call template path (reuses providers_file_path).
Sourcepub async fn get_variable(&self, key: &str) -> Option<String>
pub async fn get_variable(&self, key: &str) -> Option<String>
Retrieves a variable value by key, checking inline variables, loaders, and environment variables in order.
Trait Implementations§
Source§impl Clone for UtcpClientConfig
impl Clone for UtcpClientConfig
Source§fn clone(&self) -> UtcpClientConfig
fn clone(&self) -> UtcpClientConfig
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 UtcpClientConfig
impl !RefUnwindSafe for UtcpClientConfig
impl Send for UtcpClientConfig
impl Sync for UtcpClientConfig
impl Unpin for UtcpClientConfig
impl !UnwindSafe for UtcpClientConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request