pub struct ServerConfig {
pub host: String,
pub port: u16,
pub snapshot_path: Option<PathBuf>,
pub restore_from: Option<PathBuf>,
pub wal_dir: Option<PathBuf>,
pub wal_sync_mode: SyncMode,
}Fields§
§host: String§port: u16§snapshot_path: Option<PathBuf>When set, the server mounts the /admin/snapshot/{save,load} routes
and wires them to this path. None means the admin surface is
disabled entirely — the default, so we never expose admin endpoints
on a network-reachable process unless the operator asks for it.
restore_from: Option<PathBuf>When Some, the server restores the graph from this path at boot.
Missing file at boot is treated as an empty graph (same as without
--restore-from). Independent of snapshot_path so operators can
restore from a read-only location and write back somewhere else.
wal_dir: Option<PathBuf>When Some, the server attaches a WAL at this directory and
brackets every query with begin/commit/abort. Also unlocks the
/admin/checkpoint, /admin/wal/status, and
/admin/wal/truncate admin routes (only when snapshot_path
is also configured).
wal_sync_mode: SyncModeDurability cadence for the WAL. Ignored when wal_dir is None.
Implementations§
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
Source§fn eq(&self, other: &ServerConfig) -> bool
fn eq(&self, other: &ServerConfig) -> bool
self and other values to be equal, and is used by ==.impl Eq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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> 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>
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