pub struct RotationScheduler { /* private fields */ }Expand description
The rotation scheduler. Runs in a background thread, periodically triggering the refresh callback.
Implementations§
Source§impl RotationScheduler
impl RotationScheduler
Sourcepub fn new(config: RotationConfig, callback: RefreshCallback) -> Self
pub fn new(config: RotationConfig, callback: RefreshCallback) -> Self
Create a new scheduler with the given config and callback.
Sourcepub fn config_handle(&self) -> Arc<Mutex<RotationConfig>> ⓘ
pub fn config_handle(&self) -> Arc<Mutex<RotationConfig>> ⓘ
Get a handle to the config for inspection or modification.
Sourcepub fn trigger_now(&self) -> Result<(), String>
pub fn trigger_now(&self) -> Result<(), String>
Trigger a manual refresh immediately (bypasses the schedule).
Auto Trait Implementations§
impl !RefUnwindSafe for RotationScheduler
impl !UnwindSafe for RotationScheduler
impl Freeze for RotationScheduler
impl Send for RotationScheduler
impl Sync for RotationScheduler
impl Unpin for RotationScheduler
impl UnsafeUnpin for RotationScheduler
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