Struct kitsune_p2p_types::tx2::tx2_utils::ResourceBucket [−][src]
pub struct ResourceBucket<T: 'static + Send>(_);
Expand description
Control efficient access to shared resource pool.
Implementations
Add a resource to the bucket. Could be a new resource, or a previously acquired resource.
Acquire a resource that is immediately available from the bucket or generate a new one.
pub fn acquire(
&self,
timeout: Option<KitsuneTimeout>
) -> impl Future<Output = KitsuneResult<T>> + 'static + Send
pub fn acquire(
&self,
timeout: Option<KitsuneTimeout>
) -> impl Future<Output = KitsuneResult<T>> + 'static + Send
Acquire a resource from the bucket.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for ResourceBucket<T>
impl<T> Send for ResourceBucket<T>
impl<T> Sync for ResourceBucket<T>
impl<T> Unpin for ResourceBucket<T>
impl<T> !UnwindSafe for ResourceBucket<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
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>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more