pub struct ClusterArgs {Show 15 fields
pub keypair: Keypair,
pub database: Database,
pub listen_addrs: Vec<Multiaddr>,
pub node_count: usize,
pub node_index: usize,
pub bucket_count: u16,
pub partition_count: u16,
pub replication_factor: u8,
pub assigned_partitions: HashSet<PartitionId>,
pub heartbeat_timeout: Duration,
pub heartbeat_interval: Duration,
pub replication_buffer_size: usize,
pub replication_buffer_timeout: Duration,
pub replication_catchup_timeout: Duration,
pub mdns: bool,
}Expand description
Configuration parameters for creating a new Swarm actor
Fields§
§keypair: KeypairIdentity key for this node
database: DatabaseReference to the local database instance
listen_addrs: Vec<Multiaddr>List of addresses to listen on
node_count: usizeTotal number of nodes in the cluster
node_index: usizeZero-based index of this node in the cluster
bucket_count: u16Total number of buckets in the system
partition_count: u16Total number of partitions in the system
replication_factor: u8Number of replicas to maintain for each partition
assigned_partitions: HashSet<PartitionId>Partitions assigned to this node
heartbeat_timeout: DurationMaximum time to wait for a heartbeat before considering a peer down
heartbeat_interval: DurationInterval between heartbeat messages
replication_buffer_size: usizeMaximum number of out-of-order writes to buffer per partition
replication_buffer_timeout: DurationMaximum time to keep buffered writes before timing out
replication_catchup_timeout: DurationMaximum time before requesting a catchup
mdns: boolWhether mdns is enabled
Auto Trait Implementations§
impl Freeze for ClusterArgs
impl !RefUnwindSafe for ClusterArgs
impl Send for ClusterArgs
impl Sync for ClusterArgs
impl Unpin for ClusterArgs
impl !UnwindSafe for ClusterArgs
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
Handles the dyn message with the provided actor state, ref, and reply sender.
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