pub struct SpeedTest { /* private fields */ }Implementations§
Source§impl SpeedTest
impl SpeedTest
pub fn new(config: TestConfig) -> Result<Self, Box<dyn Error>>
Sourcepub fn with_events(
config: TestConfig,
events: Option<EventSender>,
) -> Result<Self, Box<dyn Error>>
pub fn with_events( config: TestConfig, events: Option<EventSender>, ) -> Result<Self, Box<dyn Error>>
Create a speed test that reports progress through an EventSender.
Front-ends (CLI, GUI) pass a channel here to receive live
TestEvents; passing None runs silently.
Sourcepub fn set_events(&mut self, events: Option<EventSender>)
pub fn set_events(&mut self, events: Option<EventSender>)
Attach or replace the progress event channel.
Sourcepub async fn run_full_test(&self) -> Result<SpeedTestResult, Box<dyn Error>>
pub async fn run_full_test(&self) -> Result<SpeedTestResult, Box<dyn Error>>
Run the complete speed test with intelligent server selection
Auto Trait Implementations§
impl !RefUnwindSafe for SpeedTest
impl !UnwindSafe for SpeedTest
impl Freeze for SpeedTest
impl Send for SpeedTest
impl Sync for SpeedTest
impl Unpin for SpeedTest
impl UnsafeUnpin 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