pub struct ServiceRouter<'a> {
pub catalog: &'a ServiceCatalog,
pub this_node_did: String,
pub weight_latency: f64,
pub weight_cost: f64,
pub weight_reliability: f64,
}Fields§
§catalog: &'a ServiceCatalog§this_node_did: String§weight_latency: f64§weight_cost: f64§weight_reliability: f64Implementations§
Source§impl<'a> ServiceRouter<'a>
impl<'a> ServiceRouter<'a>
pub fn new(catalog: &'a ServiceCatalog) -> Self
pub fn classify_tier(&self, manifest: &ServiceCapabilityManifest) -> RouteTier
pub fn rank_candidates( &self, service_id: &str, trace: Option<&RoutingTraceVector>, ) -> Vec<RoutingCandidate>
pub fn select_best_route( &self, service_id: &str, trace: Option<&RoutingTraceVector>, ) -> Option<RoutingCandidate>
Auto Trait Implementations§
impl<'a> Forget for ServiceRouter<'a>
impl<'a> Freeze for ServiceRouter<'a>
impl<'a> RefUnwindSafe for ServiceRouter<'a>
impl<'a> Send for ServiceRouter<'a>
impl<'a> Sync for ServiceRouter<'a>
impl<'a> Unpin for ServiceRouter<'a>
impl<'a> UnsafeUnpin for ServiceRouter<'a>
impl<'a> UnwindSafe for ServiceRouter<'a>
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