Skip to main content

resolve_best_available_on

Function resolve_best_available_on 

Source
pub fn resolve_best_available_on<S: Session + ?Sized>(
    session: &mut S,
    role: BestAvailableRole,
    topic_name: &str,
    qos: QoSProfile,
) -> QoSProfile
Expand description

Resolve qos’s best-available fields against what session has discovered on topic_name — issue 1973. The graph half of QoSProfile::resolve_best_available, shared by every create path.

Queries Session::get_endpoint_info_by_topic for the OTHER side of the topic (subscriptions for a publisher, publishers for a subscription) and folds each endpoint’s GraphEndpointInfo::qos. A backend that cannot answer — Unsupported, or any error from the walk — is treated as having discovered nothing, which resolves to upstream’s documented nothing-discovered profile rather than to a guess. A BestAvailableRole::Service never walks the graph.

Returns qos unchanged when nothing in it is best-available, so it is free to call on every create.