pub struct SelectionConfig {
pub mobility_weight: f64,
pub resource_weight: f64,
pub battery_weight: f64,
pub proximity_weight: f64,
pub max_distance_meters: Option<f64>,
pub max_children_per_parent: Option<usize>,
}Expand description
Peer selection configuration
Fields§
§mobility_weight: f64Weight for mobility factor (0.0-1.0)
resource_weight: f64Weight for resource availability (0.0-1.0)
battery_weight: f64Weight for battery level (0.0-1.0)
proximity_weight: f64Weight for geographic proximity (0.0-1.0)
max_distance_meters: Option<f64>Maximum distance in meters (None = unlimited)
max_children_per_parent: Option<usize>Maximum number of linked peers per node (None = unlimited)
Implementations§
Source§impl SelectionConfig
impl SelectionConfig
Sourcepub fn distributed() -> Self
pub fn distributed() -> Self
Distributed configuration for wide-area operations
Trait Implementations§
Source§impl Clone for SelectionConfig
impl Clone for SelectionConfig
Source§fn clone(&self) -> SelectionConfig
fn clone(&self) -> SelectionConfig
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 SelectionConfig
impl Debug for SelectionConfig
Auto Trait Implementations§
impl Freeze for SelectionConfig
impl RefUnwindSafe for SelectionConfig
impl Send for SelectionConfig
impl Sync for SelectionConfig
impl Unpin for SelectionConfig
impl UnsafeUnpin for SelectionConfig
impl UnwindSafe for SelectionConfig
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