pub struct SpeedtestService;Expand description
网络测速相关业务
Implementations§
Source§impl SpeedtestService
impl SpeedtestService
Sourcepub async fn test_endpoints(
urls: Vec<String>,
timeout_secs: Option<u64>,
) -> Result<Vec<EndpointLatency>, AppError>
pub async fn test_endpoints( urls: Vec<String>, timeout_secs: Option<u64>, ) -> Result<Vec<EndpointLatency>, AppError>
测试一组端点的响应延迟。
Auto Trait Implementations§
impl Freeze for SpeedtestService
impl RefUnwindSafe for SpeedtestService
impl Send for SpeedtestService
impl Sync for SpeedtestService
impl Unpin for SpeedtestService
impl UnsafeUnpin for SpeedtestService
impl UnwindSafe for SpeedtestService
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