pub struct LocalFileTreeSourceFactory { /* private fields */ }Expand description
Thread-safe factory configuring each worker-owned local source.
Clones copy only the numeric watcher limit. Source construction and native watcher allocation happen later on the filesystem worker.
§Examples
use ailloli_ui_fs_local::LocalFileTreeSourceFactory;
let factory = LocalFileTreeSourceFactory::new().max_watchers(64);
let _: LocalFileTreeSourceFactory = factory;Implementations§
Source§impl LocalFileTreeSourceFactory
Builder operations for worker source configuration.
impl LocalFileTreeSourceFactory
Builder operations for worker source configuration.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a factory with the 1,024-watcher default.
No native watcher is allocated by this constructor.
§Examples
use ailloli_ui_fs_local::LocalFileTreeSourceFactory;
let _: LocalFileTreeSourceFactory = LocalFileTreeSourceFactory::new();Sourcepub fn max_watchers(self, max_watchers: usize) -> Self
pub fn max_watchers(self, max_watchers: usize) -> Self
Replaces the per-source watcher ceiling.
Zero is accepted and prevents every new watch while leaving file I/O usable. Existing sources are unaffected because the factory is consumed.
§Examples
use ailloli_ui_fs_local::LocalFileTreeSourceFactory;
let disabled = LocalFileTreeSourceFactory::new().max_watchers(0);
let _: LocalFileTreeSourceFactory = disabled;Trait Implementations§
Source§impl Clone for LocalFileTreeSourceFactory
impl Clone for LocalFileTreeSourceFactory
Source§fn clone(&self) -> LocalFileTreeSourceFactory
fn clone(&self) -> LocalFileTreeSourceFactory
Returns a copy 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 LocalFileTreeSourceFactory
impl Debug for LocalFileTreeSourceFactory
Source§impl Default for LocalFileTreeSourceFactory
Selects DEFAULT_LOCAL_FILE_TREE_MAX_WATCHERS for new sources.
impl Default for LocalFileTreeSourceFactory
Selects DEFAULT_LOCAL_FILE_TREE_MAX_WATCHERS for new sources.
Source§impl FileTreeSourceFactory for LocalFileTreeSourceFactory
Allocates a configured local source on the calling worker thread.
impl FileTreeSourceFactory for LocalFileTreeSourceFactory
Allocates a configured local source on the calling worker thread.
Auto Trait Implementations§
impl Freeze for LocalFileTreeSourceFactory
impl RefUnwindSafe for LocalFileTreeSourceFactory
impl Send for LocalFileTreeSourceFactory
impl Sync for LocalFileTreeSourceFactory
impl Unpin for LocalFileTreeSourceFactory
impl UnwindSafe for LocalFileTreeSourceFactory
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