pub struct LocalityConfig { /* private fields */ }Expand description
Configuration for laying processes out across a failure-domain topology.
Each dimension accepts a fixed count (3) or a range (1..=3) via
ProcessCount. Ranges are sampled once per seed from the simulation RNG,
so every seed exercises a different cluster shape — mirroring FoundationDB’s
per-seed topology generation. The total process count is the product of the
four sampled dimensions.
Implementations§
Source§impl LocalityConfig
impl LocalityConfig
Sourcepub fn new(
datacenters: impl Into<ProcessCount>,
zones_per_datacenter: impl Into<ProcessCount>,
machines_per_zone: impl Into<ProcessCount>,
processes_per_machine: impl Into<ProcessCount>,
) -> Self
pub fn new( datacenters: impl Into<ProcessCount>, zones_per_datacenter: impl Into<ProcessCount>, machines_per_zone: impl Into<ProcessCount>, processes_per_machine: impl Into<ProcessCount>, ) -> Self
Create a topology config. Each argument is a fixed count (3) or a range
(1..=3) sampled per seed.
Trait Implementations§
Source§impl Clone for LocalityConfig
impl Clone for LocalityConfig
Source§fn clone(&self) -> LocalityConfig
fn clone(&self) -> LocalityConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalityConfig
impl RefUnwindSafe for LocalityConfig
impl Send for LocalityConfig
impl Sync for LocalityConfig
impl Unpin for LocalityConfig
impl UnsafeUnpin for LocalityConfig
impl UnwindSafe for LocalityConfig
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