pub struct NativeConfig {
pub create_if_missing: bool,
pub reserve_node_capacity: Option<usize>,
pub reserve_edge_capacity: Option<usize>,
pub cpu_profile: Option<CpuProfile>,
pub max_parallel_transactions: usize,
pub checkpoint_strategy: Option<CheckpointStrategy>,
}Expand description
Configuration for native backend operations.
Fields§
§create_if_missing: boolWhether to create the graph file if it doesn’t exist
reserve_node_capacity: Option<usize>Optional capacity pre-allocation for nodes (performance optimization)
reserve_edge_capacity: Option<usize>Optional capacity pre-allocation for edges (performance optimization)
cpu_profile: Option<CpuProfile>CPU Profile for performance optimizations
max_parallel_transactions: usizeMaximum number of parallel WAL recovery transactions (default: 4)
checkpoint_strategy: Option<CheckpointStrategy>Checkpoint strategy (default: Adaptive with sensible defaults)
Implementations§
Source§impl NativeConfig
impl NativeConfig
Sourcepub fn effective_cpu_profile(&self) -> CpuProfile
pub fn effective_cpu_profile(&self) -> CpuProfile
Get the effective CPU profile, considering environment variables and defaults
Sourcepub fn with_cpu_profile(self, profile: CpuProfile) -> Self
pub fn with_cpu_profile(self, profile: CpuProfile) -> Self
Set the CPU profile (builder pattern)
Sourcepub fn with_parallel_recovery(self, degree: usize) -> Self
pub fn with_parallel_recovery(self, degree: usize) -> Self
Set the maximum parallel WAL recovery transactions (builder pattern)
Sourcepub fn with_checkpoint_strategy(self, strategy: CheckpointStrategy) -> Self
pub fn with_checkpoint_strategy(self, strategy: CheckpointStrategy) -> Self
Set the checkpoint strategy (builder pattern)
Sourcepub fn with_transaction_checkpoint(self, threshold: u64) -> Self
pub fn with_transaction_checkpoint(self, threshold: u64) -> Self
Set transaction-count checkpoint threshold (builder pattern)
Sourcepub fn with_size_checkpoint(self, threshold_bytes: u64) -> Self
pub fn with_size_checkpoint(self, threshold_bytes: u64) -> Self
Set size-based checkpoint threshold (builder pattern)
Sourcepub fn with_time_checkpoint(self, interval_secs: u64) -> Self
pub fn with_time_checkpoint(self, interval_secs: u64) -> Self
Set time-based checkpoint interval (builder pattern)
Trait Implementations§
Source§impl Clone for NativeConfig
impl Clone for NativeConfig
Source§fn clone(&self) -> NativeConfig
fn clone(&self) -> NativeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeConfig
impl Debug for NativeConfig
Auto Trait Implementations§
impl Freeze for NativeConfig
impl RefUnwindSafe for NativeConfig
impl Send for NativeConfig
impl Sync for NativeConfig
impl Unpin for NativeConfig
impl UnwindSafe for NativeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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