pub trait BayesianObserver:
Send
+ Sync
+ 'static {
// Required method
fn observe(&self, proxy_id: Uuid, success: bool);
}Expand description
Callback that receives outcome observations for a specific proxy.
ProxyManager calls observe(success = true) on
ProxyHandle::mark_success
and observe(success = false) on drop without mark_success. The
default implementation is NoopBayesianObserver, which discards
observations; the bayesian-rotation feature wires
[ThompsonStrategy] in via
[crate::manager::ProxyManagerBuilder::with_thompson_sampling].
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".