Skip to content

Commit a651fed

Browse files
committed
fix doc being missing for ExecutionProfileHandle::load_balancing_policy
1 parent 84ee6aa commit a651fed

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scylla/src/transport/execution_profile.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,18 @@ impl ExecutionProfileHandle {
486486
self.0 .0.store(profile.0)
487487
}
488488

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

0 commit comments

Comments
 (0)