Struct async_speed_limit::limiter::Resource [−][src]
pub struct Resource<R, C: Clock> { /* fields omitted */ }
Expand description
A speed-limited wrapper of a byte stream.
The Resource
can be used to limit speed of
Just like Limiter
, the delay is inserted after the data are sent
or received, in which we know the exact amount of bytes transferred to
give an accurate delay. The instantaneous speed can exceed the limit if
many read/write tasks are started simultaneously. Therefore, restricting
the concurrency is also important to avoid breaching the constraint.
Implementations
Unwraps this value, returns the underlying resource.
Gets a reference to the underlying resource.
It is inadvisable to directly operate the underlying resource.
Gets a mutable reference to the underlying resource.
It is inadvisable to directly operate the underlying resource.
Gets a pinned reference to the underlying resource.
It is inadvisable to directly operate the underlying resource.