pub struct NodeConfig {
pub database: DatabaseConfig,
pub default_trust_distance: u32,
pub network_listen_address: String,
pub security_config: SecurityConfig,
pub schema_service_url: Option<String>,
}Expand description
Configuration for a DataFoldNode instance.
Fields§
§database: DatabaseConfigDatabase storage configuration
default_trust_distance: u32Default trust distance for queries when not explicitly specified Must be greater than 0
network_listen_address: StringNetwork listening address
security_config: SecurityConfigSecurity configuration
schema_service_url: Option<String>URL of the schema service (optional, if not provided will load from local directories)
Implementations§
Source§impl NodeConfig
impl NodeConfig
Sourcepub fn new(storage_path: PathBuf) -> Self
pub fn new(storage_path: PathBuf) -> Self
Create a new node configuration with the specified storage path
Sourcepub fn get_storage_path(&self) -> PathBuf
pub fn get_storage_path(&self) -> PathBuf
Get the effective storage path (from database config)
Sourcepub fn with_network_listen_address(self, address: &str) -> Self
pub fn with_network_listen_address(self, address: &str) -> Self
Set the network listening address
Sourcepub fn with_schema_service_url(self, url: &str) -> Self
pub fn with_schema_service_url(self, url: &str) -> Self
Set the schema service URL
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 · 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
Source§impl Default for NodeConfig
impl Default for NodeConfig
Source§impl<'de> Deserialize<'de> for NodeConfig
impl<'de> Deserialize<'de> for NodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin 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<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