Struct kitsune_p2p_types::KitsuneTimeout [−][src]
pub struct KitsuneTimeout(_);
Expand description
Kitsune Timeout
Implementations
Convenience fn to create a new timeout for an amount of milliseconds.
Generate a backoff instance bound to this timeout
Get Duration until timeout expires.
Has this timeout expired?
Ok(())
if not expired, Err(KitsuneError::TimedOut)
if expired.
pub fn mix<'a, 'b, R, F>(
&'a self,
f: F
) -> impl Future<Output = KitsuneResult<R>> + 'b + Send where
R: 'b,
F: Future<Output = KitsuneResult<R>> + 'b + Send,
pub fn mix<'a, 'b, R, F>(
&'a self,
f: F
) -> impl Future<Output = KitsuneResult<R>> + 'b + Send where
R: 'b,
F: Future<Output = KitsuneResult<R>> + 'b + Send,
Wrap a future with one that will timeout when this timeout expires.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KitsuneTimeout
impl Send for KitsuneTimeout
impl Sync for KitsuneTimeout
impl Unpin for KitsuneTimeout
impl UnwindSafe for KitsuneTimeout
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