pub struct WatchConfig {
pub in_process: bool,
pub buffer_size: usize,
pub poll_interval_ms: u64,
}Expand description
Configuration for the watch system (in-process and cross-process).
Controls whether in-process channel subscriptions are enabled, the channel buffer size for real-time experience notifications, and the poll interval for cross-process change detection.
§Example
use pulsedb::Config;
let config = Config {
watch: pulsedb::WatchConfig {
in_process: true,
buffer_size: 500,
poll_interval_ms: 200,
},
..Default::default()
};Fields§
§in_process: boolEnable in-process watch subscriptions via crossbeam channels.
When true (default), watch_experiences()
streams receive real-time events. When false, in-process event
dispatch is skipped entirely — only cross-process
poll_changes() remains available.
Default: true
buffer_size: usizeMaximum number of events buffered per subscriber (in-process).
When a subscriber’s channel is full, new events are dropped for that subscriber (with a warning log). The publisher never blocks.
Default: 1000
poll_interval_ms: u64Poll interval in milliseconds for cross-process change detection.
Reader processes call poll_changes() at this interval to check
for new experiences written by the writer process.
Default: 100
Trait Implementations§
Source§impl Clone for WatchConfig
impl Clone for WatchConfig
Source§fn clone(&self) -> WatchConfig
fn clone(&self) -> WatchConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchConfig
impl Debug for WatchConfig
Auto Trait Implementations§
impl Freeze for WatchConfig
impl RefUnwindSafe for WatchConfig
impl Send for WatchConfig
impl Sync for WatchConfig
impl Unpin for WatchConfig
impl UnsafeUnpin for WatchConfig
impl UnwindSafe for WatchConfig
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more