pub struct NearbySelectionConfig {
pub distribution_type: NearbyDistributionType,
pub max_nearby_size: Option<usize>,
pub min_distance: f64,
}Expand description
Configuration for nearby selection.
Fields§
§distribution_type: NearbyDistributionTypeThe distribution type to use.
max_nearby_size: Option<usize>Maximum number of nearby candidates to consider. If None, considers all candidates (sorted by distance).
min_distance: f64Minimum distance to include a candidate (exclusive of origin).
Implementations§
Source§impl NearbySelectionConfig
impl NearbySelectionConfig
Sourcepub fn with_distribution_type(
self,
distribution_type: NearbyDistributionType,
) -> Self
pub fn with_distribution_type( self, distribution_type: NearbyDistributionType, ) -> Self
Sets the distribution type.
Sourcepub fn with_max_nearby_size(self, max_size: usize) -> Self
pub fn with_max_nearby_size(self, max_size: usize) -> Self
Sets the maximum number of nearby candidates.
Sourcepub fn with_min_distance(self, min_distance: f64) -> Self
pub fn with_min_distance(self, min_distance: f64) -> Self
Sets the minimum distance threshold.
Trait Implementations§
Source§impl Clone for NearbySelectionConfig
impl Clone for NearbySelectionConfig
Source§fn clone(&self) -> NearbySelectionConfig
fn clone(&self) -> NearbySelectionConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 NearbySelectionConfig
impl Debug for NearbySelectionConfig
Auto Trait Implementations§
impl Freeze for NearbySelectionConfig
impl RefUnwindSafe for NearbySelectionConfig
impl Send for NearbySelectionConfig
impl Sync for NearbySelectionConfig
impl Unpin for NearbySelectionConfig
impl UnwindSafe for NearbySelectionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more