pub struct SpeedtestConfig {
pub config_url: Option<Url>,
pub large_download_url: Url,
pub small_download_url: Url,
pub upload_url: Url,
pub latency: LatencyConfigOpts,
pub rpm: RpmConfigOpts,
}Fields§
§config_url: Option<Url>The endpoint to get the responsiveness config from. Should be JSON in the form:
{
"version": number,
"test_endpoint": string?,
"urls": {
"small_https_download_url": string,
"large_https_download_url": string,
"https_upload_url": string
}
}large_download_url: UrlThe large file endpoint which should be multiple GBs.
small_download_url: UrlThe small file endpoint which should be very small, only a few bytes.
upload_url: UrlThe upload url which accepts an arbitrary amount of data.
latency: LatencyConfigOpts§rpm: RpmConfigOptsTrait Implementations§
Source§impl Debug for SpeedtestConfig
impl Debug for SpeedtestConfig
Source§impl Default for SpeedtestConfig
impl Default for SpeedtestConfig
Source§fn default() -> Self
fn default() -> Self
Return SpeedtestConfig { config_url: Default::default(), large_download_url: "https://h3.speed.cloudflare.com/__down?bytes=10000000000".parse().unwrap(), small_download_url: "https://h3.speed.cloudflare.com/__down?bytes=10".parse().unwrap(), upload_url: "https://h3.speed.cloudflare.com/__up".parse().unwrap(), latency: Default::default(), rpm: Default::default() }
Source§impl<'de> Deserialize<'de> for SpeedtestConfigwhere
SpeedtestConfig: Default,
impl<'de> Deserialize<'de> for SpeedtestConfigwhere
SpeedtestConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SpeedtestConfig
impl RefUnwindSafe for SpeedtestConfig
impl Send for SpeedtestConfig
impl Sync for SpeedtestConfig
impl Unpin for SpeedtestConfig
impl UnsafeUnpin for SpeedtestConfig
impl UnwindSafe for SpeedtestConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.