Skip to content

Commit

Permalink
fix doc being missing for ExecutionProfileHandle::load_balancing_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten0 committed Jul 3, 2023
1 parent 84ee6aa commit a651fed
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scylla/src/transport/execution_profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,18 @@ impl ExecutionProfileHandle {
self.0 .0.store(profile.0)
}

/// Get the load balancing policy associated with this execution profile.
///
/// This may be useful if one wants to construct a new load balancing policy
/// that is based on the one associated with this execution profile.
pub fn load_balancing_policy(&self) -> Arc<dyn LoadBalancingPolicy> {
// Exposed as a building block of `Batch::enforce_target_node` in case a user
// wants more control than what that method does.
// Since the fact that the load balancing policy is accessible from the
// ExecutionProfileHandle is already public API through the fact it's documented
// that it would be preserved by pointee_to_builder, having this as pblic API
// doesn't prevent any more non-breaking evolution than would already be
// blocked anyway
self.0 .0.load().load_balancing_policy.clone()
}
}

0 comments on commit a651fed

Please sign in to comment.