pub struct WatcherConfig {
pub name: String,
pub testnet: bool,
pub homeserver: PubkyId,
pub events_limit: u32,
pub watcher_sleep: u64,
pub stack: StackConfig,
pub moderation_id: PubkyId,
pub moderated_tags: Vec<String>,
}Expand description
Configuration settings for the Nexus Watcher service
Fields§
§name: String§testnet: bool§homeserver: PubkyId§events_limit: u32§watcher_sleep: u64§stack: StackConfig§moderation_id: PubkyIdTrait Implementations§
Source§impl Clone for WatcherConfig
impl Clone for WatcherConfig
Source§fn clone(&self) -> WatcherConfig
fn clone(&self) -> WatcherConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigLoader<WatcherConfig> for WatcherConfig
impl ConfigLoader<WatcherConfig> for WatcherConfig
Source§impl Debug for WatcherConfig
impl Debug for WatcherConfig
Source§impl Default for WatcherConfig
impl Default for WatcherConfig
Source§impl<'de> Deserialize<'de> for WatcherConfig
impl<'de> Deserialize<'de> for WatcherConfig
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 WatcherConfig
Converts a DaemonConfig into an WatcherConfig, extracting only the Watcher-related settings
and the shared application stack
impl From<DaemonConfig> for WatcherConfig
Converts a DaemonConfig into an WatcherConfig, extracting only the Watcher-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.
Source§impl PartialEq for WatcherConfig
impl PartialEq for WatcherConfig
Source§impl Serialize for WatcherConfig
impl Serialize for WatcherConfig
impl StructuralPartialEq for WatcherConfig
Auto Trait Implementations§
impl Freeze for WatcherConfig
impl RefUnwindSafe for WatcherConfig
impl Send for WatcherConfig
impl Sync for WatcherConfig
impl Unpin for WatcherConfig
impl UnwindSafe for WatcherConfig
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