Struct fswatch_sys::FswSessionBuilder
[−]
[src]
pub struct FswSessionBuilder<F> { /* fields omitted */ }A builder for FswSession.
This builder requires that paths and callback be supplied in its constructor, as the program
may crash if a session is started without those fields.
Methods
impl<F> FswSessionBuilder<F> where F: Fn(Vec<FswCEvent>) + 'static[src]
fn new<P>(paths: Vec<P>, callback: F) -> Self where P: AsRef<Path>
Make a new builder with the required variables.
fn build(self) -> Result<FswSession, FswError>
Build the FswSession, applying all specified options before passing ownership to the caller.
If any errors occur while applying options, they are propagted up.
fn monitor(self, monitor: FswMonitorType) -> Self
Set the type of monitor for this session.
fn property(self, name: &str, value: &str) -> Self
Add a custom property to this session. Properties with the same name will keep the last value specified.
fn overflow(self, overflow: Option<bool>) -> Self
Set the overflow property for this session.
fn latency(self, latency: Option<c_double>) -> Self
Set the latency for this session, for monitors using this property.
fn recursive(self, recursive: Option<bool>) -> Self
Set whether this session should be recursive.
fn directory_only(self, directory_only: Option<bool>) -> Self
Set whether this session is directory only.
fn follow_symlinks(self, follow_symlinks: Option<bool>) -> Self
Set whether this session should follow symlinks.
fn add_event_filter(self, filter_type: FswEventFlag) -> Self
Add an event flag filter for this session.
fn add_filter(self, filter: FswCMonitorFilter) -> Self
Add a filter for this session.