Skip to main content

Retainable

Trait Retainable 

Source
pub trait Retainable: Send + Sync {
    // Required methods
    fn retain(&self, close: Box<dyn FnOnce() + Send>) -> bool;
    fn end(&self);
}
Expand description

A Home pick a pooled upstream socket can keep beyond the turn (Go ExecutionLifecycle with Retain).

Required Methods§

Source

fn retain(&self, close: Box<dyn FnOnce() + Send>) -> bool

Go Bind + Retain: the socket takes the pick over. Home draining the pick runs close once, before the pick is released. False when the pick already ended; the socket must not be kept then.

Source

fn end(&self)

Go End: the socket that kept the pick was invalidated, replaced or closed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§