pub struct Speedtest { /* private fields */ }Implementations§
Source§impl Speedtest
impl Speedtest
pub fn new( timeout: u64, secure: bool, source_address: Option<String>, ) -> Result<Self>
pub fn set_debug(&mut self, debug: bool)
pub fn get_config(&mut self) -> Result<&Config>
pub fn get_servers( &mut self, server_ids: Option<&[u32]>, exclude: Option<&[u32]>, ) -> Result<&HashMap<u32, Vec<Server>>>
pub fn get_closest_servers(&mut self, limit: usize) -> Result<&[Server]>
pub fn get_best_server(&mut self, servers: Option<&[Server]>) -> Result<&Server>
pub fn download<F>(&self, _callback: F, threads: Option<usize>) -> Result<f64>
pub fn upload<F>( &self, _callback: F, threads: Option<usize>, _pre_allocate: bool, ) -> Result<f64>
pub fn get_results(&self) -> Option<SpeedtestResults>
Auto Trait Implementations§
impl Freeze for Speedtest
impl !RefUnwindSafe for Speedtest
impl Send for Speedtest
impl Sync for Speedtest
impl Unpin for Speedtest
impl !UnwindSafe for Speedtest
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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