pub struct ServerTimer;Trait Implementations§
Source§impl Timer for ServerTimer
Manages timeouts for the WebSocket server.
impl Timer for ServerTimer
Manages timeouts for the WebSocket server.
Source§async fn run_with_timeout<F: Future>(
&mut self,
duration: Self::Duration,
future: F,
) -> Result<F::Output, Self::TimeoutError>
async fn run_with_timeout<F: Future>( &mut self, duration: Self::Duration, future: F, ) -> Result<F::Output, Self::TimeoutError>
Runs a future with a timeout.
Source§type TimeoutError = TimeoutError
type TimeoutError = TimeoutError
The error returned if a future fails to resolve in time.
Auto Trait Implementations§
impl Freeze for ServerTimer
impl RefUnwindSafe for ServerTimer
impl Send for ServerTimer
impl Sync for ServerTimer
impl Unpin for ServerTimer
impl UnwindSafe for ServerTimer
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