pub struct LimitDatagram<D: Datagram> { /* private fields */ }Implementations§
Source§impl<D: Datagram> LimitDatagram<D>
impl<D: Datagram> LimitDatagram<D>
pub fn new( inner: D, read_limit: SpeedLimitSession, write_limit: SpeedLimitSession, ) -> Self
Trait Implementations§
Source§impl<D: Datagram> Datagram for LimitDatagram<D>
impl<D: Datagram> Datagram for LimitDatagram<D>
type Error = <D as Datagram>::Error
fn send_to<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recv_from<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<D> Freeze for LimitDatagram<D>where
D: Freeze,
impl<D> RefUnwindSafe for LimitDatagram<D>where
D: RefUnwindSafe,
impl<D> Send for LimitDatagram<D>
impl<D> Sync for LimitDatagram<D>where
D: Sync,
impl<D> Unpin for LimitDatagram<D>where
D: Unpin,
impl<D> UnwindSafe for LimitDatagram<D>where
D: UnwindSafe,
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