pub struct WatchOptions {
pub session: Option<String>,
pub event_type: Option<String>,
pub permission_mode: Option<String>,
pub framework: Option<String>,
pub poll_ms: u64,
}Expand description
Options for the watch command.
Using a struct instead of individual parameters makes the API more maintainable
and prevents parameter order mistakes, especially with multiple Option<String> fields.
Fields§
§session: Option<String>Filter by session ID
event_type: Option<String>Filter by event type
permission_mode: Option<String>Filter by permission mode
framework: Option<String>Filter by framework (claude, gemini, cursor, etc.)
poll_ms: u64Poll interval in milliseconds (default: 500)
Implementations§
Source§impl WatchOptions
impl WatchOptions
Sourcepub fn event_type(self, event_type: impl Into<Option<String>>) -> Self
pub fn event_type(self, event_type: impl Into<Option<String>>) -> Self
Set the event type filter.
Sourcepub fn permission_mode(self, permission_mode: impl Into<Option<String>>) -> Self
pub fn permission_mode(self, permission_mode: impl Into<Option<String>>) -> Self
Set the permission mode filter.
Trait Implementations§
Source§impl Clone for WatchOptions
impl Clone for WatchOptions
Source§fn clone(&self) -> WatchOptions
fn clone(&self) -> WatchOptions
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 moreSource§impl Debug for WatchOptions
impl Debug for WatchOptions
Auto Trait Implementations§
impl Freeze for WatchOptions
impl RefUnwindSafe for WatchOptions
impl Send for WatchOptions
impl Sync for WatchOptions
impl Unpin for WatchOptions
impl UnwindSafe for WatchOptions
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