Skip to main content

WeakKeepalive

Trait WeakKeepalive 

Source
pub trait WeakKeepalive: Send + Sync {
    // Required method
    fn upgrade(&self) -> Option<Arc<dyn Keepalive>>;
}
Expand description

Counterpart to Keepalive: a non-pinning reference to the same underlying resource that can be re-promoted to a Keepalive as long as the resource is still alive.

Required Methods§

Source

fn upgrade(&self) -> Option<Arc<dyn Keepalive>>

Re-acquire a strong Keepalive for the underlying resource, or None if the referent has gone away.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§