pub struct ClusterBuilder { /* private fields */ }Expand description
Builder for a Cluster. Obtain via Cluster::builder.
Implementations§
Source§impl ClusterBuilder
impl ClusterBuilder
Sourcepub fn peers(self, n: usize) -> Self
pub fn peers(self, n: usize) -> Self
Number of peers (independent Instances) to start. Defaults to 2.
Sourcepub fn clock(self, clock: Arc<dyn Clock>) -> Self
pub fn clock(self, clock: Arc<dyn Clock>) -> Self
Share a single clock across every peer (e.g. a FixedClock the test
drives by hand). When unset, each peer gets its own fresh FixedClock,
mirroring the standard test_instance() setup.
Sourcepub fn transport(self, transport: Arc<dyn TestTransport>) -> Self
pub fn transport(self, transport: Arc<dyn TestTransport>) -> Self
Use a custom TestTransport for every peer. Defaults to HttpLoopback.
Auto Trait Implementations§
impl Freeze for ClusterBuilder
impl !RefUnwindSafe for ClusterBuilder
impl Send for ClusterBuilder
impl Sync for ClusterBuilder
impl Unpin for ClusterBuilder
impl UnsafeUnpin for ClusterBuilder
impl !UnwindSafe for ClusterBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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