Closed nick42d closed 3 months ago
/// Number of retries to allow per web request (ie, per chunk downloaded)
/// Default is [`crate::constants::DEFAULT_RETRIES`].
///
/// # Example
///
/// // Allow 5 retries per chunk.
/// let video_options = VideoOptions {
/// request_options: RequestOptions {
/// max_retries: Some(5),
/// ..Default::default()
/// },
/// ..Default::default()
/// };
///
pub max_retries: Option<u32>,
max_retries
more suitable for the option name
/// Number of retries to allow per web request (ie, per chunk downloaded) /// Default is [`crate::constants::DEFAULT_RETRIES`]. /// /// # Example /// /// // Allow 5 retries per chunk. /// let video_options = VideoOptions { /// request_options: RequestOptions { /// max_retries: Some(5), /// ..Default::default() /// }, /// ..Default::default() /// }; /// pub max_retries: Option<u32>,
max_retries
more suitable for the option name
Updated now!
Perhaps more unlikely with the new changes from 3.8.24, but it could be still possible for chunk max retries to be insufficient. This PR allows library consumers to override the default number of retries. Used an Option in RequestOptions to work in with the
derive(Default)
.IMO - resolves #32.