pub struct ThrottleableRuntime {
name: String,
handle: Handle,
shared_with_future: Arc<RuntimeRateLimiter>,
_dropper: Arc<Dropper>,
}
Expand description
A runtime to run future tasks
Fields§
§name: String
§handle: Handle
§_dropper: Arc<Dropper>
Implementations§
Trait Implementations§
source§impl BuilderBuild<ThrottleableRuntime> for Builder
impl BuilderBuild<ThrottleableRuntime> for Builder
fn build(&mut self) -> Result<ThrottleableRuntime>
source§impl Clone for ThrottleableRuntime
impl Clone for ThrottleableRuntime
source§fn clone(&self) -> ThrottleableRuntime
fn clone(&self) -> ThrottleableRuntime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ThrottleableRuntime
impl Debug for ThrottleableRuntime
source§impl RuntimeTrait for ThrottleableRuntime
impl RuntimeTrait for ThrottleableRuntime
source§fn spawn<F>(&self, future: F) -> JoinHandle<F::Output> ⓘ
fn spawn<F>(&self, future: F) -> JoinHandle<F::Output> ⓘ
Spawn a future and execute it in this thread pool
Similar to tokio::runtime::Runtime::spawn()
source§fn spawn_blocking<F, R>(&self, func: F) -> JoinHandle<R> ⓘ
fn spawn_blocking<F, R>(&self, func: F) -> JoinHandle<R> ⓘ
Run the provided function on an executor dedicated to blocking operations.
Auto Trait Implementations§
impl Freeze for ThrottleableRuntime
impl !RefUnwindSafe for ThrottleableRuntime
impl Send for ThrottleableRuntime
impl Sync for ThrottleableRuntime
impl Unpin for ThrottleableRuntime
impl !UnwindSafe for ThrottleableRuntime
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request