pub struct NodeConfig { /* private fields */ }Implementations§
Source§impl NodeConfig
impl NodeConfig
pub fn new<P>( cluster_id: impl Into<String>, node_id: impl Into<String>, data_dir: PathBuf, epoch: u64, config_id: u64, peers: P, client_token: impl Into<String>, ) -> Result<Self, ConfigError>
pub fn new_embedded<I, S>( cluster_id: impl Into<String>, node_id: impl Into<String>, data_dir: PathBuf, epoch: u64, config_id: u64, members: I, ) -> Result<Self, ConfigError>
pub fn new_with_configuration<P>( cluster_id: impl Into<String>, node_id: impl Into<String>, data_dir: PathBuf, epoch: u64, membership: Membership, configuration_state: ConfigurationState, peers: P, client_token: impl Into<String>, ) -> Result<Self, ConfigError>
pub fn with_execution_profile( self, execution_profile: ExecutionProfile, ) -> Result<Self, ConfigError>
pub fn with_read_consistency(self, read_consistency: ReadConsistency) -> Self
pub fn with_sql_write_profiler(self, profiler: SqlWriteProfiler) -> Self
pub fn with_sql_group_commit_queue_capacity( self, capacity: usize, ) -> Result<Self, ConfigError>
pub fn with_ack_mode(self, ack_mode: AckMode) -> Self
pub fn with_writer_batching( self, max: usize, window: Duration, ) -> Result<Self, ConfigError>
pub fn with_log_initial_configuration( self, configuration: ConfigurationState, ) -> Self
pub fn with_predecessor_stop_entry(self, entry: LogEntry) -> Self
Sourcepub fn bind_predecessor_stop(
self,
predecessor_membership: &Membership,
entry: LogEntry,
) -> Result<Self, ConfigError>
pub fn bind_predecessor_stop( self, predecessor_membership: &Membership, entry: LogEntry, ) -> Result<Self, ConfigError>
Binds an unactivated successor draft to the exact predecessor Stop it will adopt.
pub fn with_recovery_generation( self, recovery_generation: u64, ) -> Result<Self, ConfigError>
pub fn cluster_id(&self) -> &str
pub fn logical_cluster_id(&self) -> &str
pub fn node_id(&self) -> &str
pub fn data_dir(&self) -> &PathBuf
pub const fn epoch(&self) -> u64
pub const fn config_id(&self) -> u64
pub const fn recovery_generation(&self) -> u64
pub fn peers(&self) -> &[PeerConfig]
pub const fn membership(&self) -> &Membership
pub const fn configuration_state(&self) -> &ConfigurationState
pub const fn log_initial_configuration(&self) -> &ConfigurationState
pub fn client_token(&self) -> &str
pub const fn read_consistency(&self) -> ReadConsistency
pub const fn ack_mode(&self) -> AckMode
pub const fn writer_batch_max(&self) -> usize
pub const fn writer_batch_window(&self) -> Duration
pub const fn execution_profile(&self) -> ExecutionProfile
pub const fn sql_write_profiler(&self) -> Option<&SqlWriteProfiler>
pub const fn sql_group_commit_queue_capacity(&self) -> usize
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
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 moreSource§impl Debug for NodeConfig
impl Debug for NodeConfig
impl Eq for NodeConfig
Source§impl PartialEq for NodeConfig
impl PartialEq for NodeConfig
impl StructuralPartialEq for NodeConfig
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin for NodeConfig
impl UnsafeUnpin for NodeConfig
impl UnwindSafe for NodeConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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