pub struct WatchConfig {
pub debounce: Duration,
pub patterns: Vec<String>,
pub ignore_patterns: Vec<String>,
pub max_resources: usize,
}Available on crate feature
resource-watcher and non-WebAssembly only.Expand description
Configuration for resource watching.
§Examples
use pmcp::server::resource_watcher::WatchConfig;
use std::time::Duration;
// Default configuration
let config = WatchConfig::default();
// Custom configuration
let custom_config = WatchConfig {
debounce: Duration::from_millis(1000),
patterns: vec!["**/*.rs".to_string(), "**/*.md".to_string()],
ignore_patterns: vec!["**/target/**".to_string()],
max_resources: 5000,
};Fields§
§debounce: DurationDebounce duration for file changes.
patterns: Vec<String>Patterns to watch (glob patterns).
ignore_patterns: Vec<String>Patterns to ignore.
max_resources: usizeMaximum number of resources to track.
Trait Implementations§
Source§impl Clone for WatchConfig
impl Clone for WatchConfig
Source§fn clone(&self) -> WatchConfig
fn clone(&self) -> WatchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more