pub struct DomainRecommendation {
pub starting_tier: Tier,
pub confidence: Option<f32>,
}Expand description
Recommendation returned by DomainStatePort::recommend for the next
fetch attempt against a domain. Generic over the backend’s internal
model — the only data the engine needs to act on is which tier to
start at and how confident the backend is in that choice.
§Examples
let rec = DomainRecommendation {
starting_tier: Tier::Browser,
confidence: Some(0.85),
};
println!("Start at {:?} with confidence {:?}", rec.starting_tier, rec.confidence);Fields§
§starting_tier: TierRecommended starting tier for the next request to this domain.
confidence: Option<f32>Confidence in the recommendation, in 0.0..=1.0 where 1.0 is “strong
signal”. None means “no opinion” — typically because the backend has
no observations yet, or implements a rule-based model that does not
produce a probability. Policies should treat None as “fall through to
default behaviour” rather than substituting a numeric value.
Trait Implementations§
Source§impl Clone for DomainRecommendation
impl Clone for DomainRecommendation
Source§fn clone(&self) -> DomainRecommendation
fn clone(&self) -> DomainRecommendation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DomainRecommendation
impl Debug for DomainRecommendation
Source§impl Default for DomainRecommendation
Default DomainRecommendation is “no information”: HTTP tier, no confidence.
impl Default for DomainRecommendation
Default DomainRecommendation is “no information”: HTTP tier, no confidence.
Source§impl PartialEq for DomainRecommendation
impl PartialEq for DomainRecommendation
Source§fn eq(&self, other: &DomainRecommendation) -> bool
fn eq(&self, other: &DomainRecommendation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DomainRecommendation
Auto Trait Implementations§
impl Freeze for DomainRecommendation
impl RefUnwindSafe for DomainRecommendation
impl Send for DomainRecommendation
impl Sync for DomainRecommendation
impl Unpin for DomainRecommendation
impl UnsafeUnpin for DomainRecommendation
impl UnwindSafe for DomainRecommendation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more