pub struct WatcherController { /* private fields */ }Expand description
Wrapper around the SDK’s WatchController. Today this is just a
newtype so callers don’t have to import relayburn_sdk directly to
construct or stop a watcher; tomorrow it gives us a stable boundary
to attach harness-side observability (e.g. a name, a per-adapter
metric counter) without leaking through to the SDK.
Implementations§
Source§impl WatcherController
impl WatcherController
Sourcepub fn new(inner: WatchController) -> Self
pub fn new(inner: WatchController) -> Self
Wrap a raw SDK controller. pending_stamp::adapter is the
canonical caller; bespoke adapters that build their own watch
loop also funnel through here.
Sourcepub async fn tick(&self)
pub async fn tick(&self)
Run a single tick on demand. Forwards to
WatchController::tick.
Sourcepub async fn stop(&self)
pub async fn stop(&self)
Stop the periodic loop and await any in-flight tick. Idempotent. Call this once the spawned child exits.
Sourcepub fn raw(&self) -> &WatchController
pub fn raw(&self) -> &WatchController
Borrow the wrapped controller for callers that need the raw
SDK type (e.g. integration tests parking on tick_done).
Auto Trait Implementations§
impl !Freeze for WatcherController
impl !RefUnwindSafe for WatcherController
impl Send for WatcherController
impl Sync for WatcherController
impl Unpin for WatcherController
impl UnsafeUnpin for WatcherController
impl !UnwindSafe for WatcherController
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