pub struct OperationalDelayConfig {
pub get_delay_ms: u64,
pub edit_delay_ms: u64,
pub delete_delay_ms: u64,
}Expand description
Configuration for operational delays between requests
Fields§
§get_delay_ms: u64Optional delay before each GET request (in milliseconds).
This is a pragmatic throttle to avoid triggering Last.fm’s HTML page rate limits when
scanning libraries (e.g. .../library?page=N).
edit_delay_ms: u64Delay between multiple edit operations (in milliseconds)
delete_delay_ms: u64Delay between delete operations (in milliseconds)
Implementations§
Source§impl OperationalDelayConfig
impl OperationalDelayConfig
Sourcepub fn with_delays(edit_delay_ms: u64, delete_delay_ms: u64) -> Self
pub fn with_delays(edit_delay_ms: u64, delete_delay_ms: u64) -> Self
Create config with custom delays
Sourcepub fn with_get_delay_ms(self, get_delay_ms: u64) -> Self
pub fn with_get_delay_ms(self, get_delay_ms: u64) -> Self
Set GET request delay (in milliseconds).
Trait Implementations§
Source§impl Clone for OperationalDelayConfig
impl Clone for OperationalDelayConfig
Source§fn clone(&self) -> OperationalDelayConfig
fn clone(&self) -> OperationalDelayConfig
Returns a duplicate 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 OperationalDelayConfig
impl Debug for OperationalDelayConfig
Source§impl Default for OperationalDelayConfig
impl Default for OperationalDelayConfig
Source§impl PartialEq for OperationalDelayConfig
impl PartialEq for OperationalDelayConfig
impl Eq for OperationalDelayConfig
impl StructuralPartialEq for OperationalDelayConfig
Auto Trait Implementations§
impl Freeze for OperationalDelayConfig
impl RefUnwindSafe for OperationalDelayConfig
impl Send for OperationalDelayConfig
impl Sync for OperationalDelayConfig
impl Unpin for OperationalDelayConfig
impl UnsafeUnpin for OperationalDelayConfig
impl UnwindSafe for OperationalDelayConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.