pub struct UpdateBuilder { /* private fields */ }Expand description
Builder for a throttled Update.
Configure the inner ReleaseUpdate backend and the throttle window,
then call build to produce a Box<dyn ReleaseUpdate>
that skips update checks within the configured window.
Implementations§
Source§impl UpdateBuilder
impl UpdateBuilder
Sourcepub fn release_update(
&mut self,
release_update: Box<dyn ReleaseUpdate>,
) -> &mut Self
pub fn release_update( &mut self, release_update: Box<dyn ReleaseUpdate>, ) -> &mut Self
Set the release update implementation to wrap. Required.
Sourcepub fn throttle_window(&mut self, window: Duration) -> &mut Self
pub fn throttle_window(&mut self, window: Duration) -> &mut Self
Set the minimum time between update checks. Defaults to 15 minutes.
Sourcepub fn build(&mut self) -> Result<Box<dyn ReleaseUpdate>>
pub fn build(&mut self) -> Result<Box<dyn ReleaseUpdate>>
Confirm config and create a ready-to-use Update.
- Errors:
- Config -
release_updatewas not provided
- Config -
Trait Implementations§
Source§impl Default for UpdateBuilder
impl Default for UpdateBuilder
Source§fn default() -> UpdateBuilder
fn default() -> UpdateBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for UpdateBuilder
impl !Send for UpdateBuilder
impl !Sync for UpdateBuilder
impl !UnwindSafe for UpdateBuilder
impl Freeze for UpdateBuilder
impl Unpin for UpdateBuilder
impl UnsafeUnpin for UpdateBuilder
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