pub struct ApiConfig {
pub name: String,
pub public_addr: SocketAddr,
pub stack: StackConfig,
}Expand description
Configuration settings for the Nexus Watcher service
Fields§
§name: String§public_addr: SocketAddr§stack: StackConfigTrait Implementations§
Source§impl ConfigLoader<ApiConfig> for ApiConfig
impl ConfigLoader<ApiConfig> for ApiConfig
Source§impl<'de> Deserialize<'de> for ApiConfig
impl<'de> Deserialize<'de> for ApiConfig
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 From<DaemonConfig> for ApiConfig
Converts a DaemonConfig into an ApiConfig, extracting only the API-related settings
and the shared application stack
impl From<DaemonConfig> for ApiConfig
Converts a DaemonConfig into an ApiConfig, extracting only the API-related settings
and the shared application stack
Source§fn from(daemon_config: DaemonConfig) -> Self
fn from(daemon_config: DaemonConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ApiConfig
impl RefUnwindSafe for ApiConfig
impl Send for ApiConfig
impl Sync for ApiConfig
impl Unpin for ApiConfig
impl UnwindSafe for ApiConfig
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> ConfigReader<T> for T
impl<T> ConfigReader<T> for T
Source§fn get_config_file_path(expanded_path: &Path) -> PathBuf
fn get_config_file_path(expanded_path: &Path) -> PathBuf
Returns the config file path in this directory
fn write_default_config_file(config_file_path: &PathBuf) -> Result<()>
Source§fn read_config_file<'async_trait>(
expanded_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<T, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn read_config_file<'async_trait>(
expanded_path: PathBuf,
) -> Pin<Box<dyn Future<Output = Result<T, DynError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Given a directory path, ensures the directory exists, writes a default
config.toml if absent, then parses and returns the loaded configSource§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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