pub struct PluginWatcher { /* private fields */ }Expand description
Plugin file watcher for hot reload
Implementations§
Source§impl PluginWatcher
impl PluginWatcher
Sourcepub fn new(manager: Arc<PluginManager>) -> Self
pub fn new(manager: Arc<PluginManager>) -> Self
Create a new plugin watcher
Sourcepub async fn start(&mut self) -> PluginResult<()>
pub async fn start(&mut self) -> PluginResult<()>
Start watching for plugin changes
Sourcepub async fn watch_plugin(
&mut self,
path: &Path,
plugin_id: String,
) -> PluginResult<()>
pub async fn watch_plugin( &mut self, path: &Path, plugin_id: String, ) -> PluginResult<()>
Watch a plugin file
Sourcepub async fn unwatch_plugin(&mut self, path: &Path) -> PluginResult<()>
pub async fn unwatch_plugin(&mut self, path: &Path) -> PluginResult<()>
Unwatch a plugin file
Sourcepub async fn watch_directory(&mut self, path: &Path) -> PluginResult<()>
pub async fn watch_directory(&mut self, path: &Path) -> PluginResult<()>
Watch a directory for new plugins
Sourcepub fn set_debounce(&mut self, ms: u64)
pub fn set_debounce(&mut self, ms: u64)
Set debounce time in milliseconds
Sourcepub async fn get_watched_paths(&self) -> Vec<(PathBuf, String)>
pub async fn get_watched_paths(&self) -> Vec<(PathBuf, String)>
Get watched paths
Trait Implementations§
Source§impl Drop for PluginWatcher
impl Drop for PluginWatcher
Auto Trait Implementations§
impl !RefUnwindSafe for PluginWatcher
impl !UnwindSafe for PluginWatcher
impl Freeze for PluginWatcher
impl Send for PluginWatcher
impl Sync for PluginWatcher
impl Unpin for PluginWatcher
impl UnsafeUnpin for PluginWatcher
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].