pub struct EngineBuilder { /* private fields */ }Expand description
Builds a JpxEngine from configuration with programmatic overrides.
§Example
use jpx_engine::config::EngineBuilder;
let engine = EngineBuilder::new()
.strict(false)
.disable_category("geo")
.disable_function("env")
.build()
.unwrap();Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn disable_category(self, cat: &str) -> Self
pub fn disable_category(self, cat: &str) -> Self
Adds a category to the disabled list.
Sourcepub fn disable_function(self, name: &str) -> Self
pub fn disable_function(self, name: &str) -> Self
Adds a function to the disabled list.
Sourcepub fn enable_categories(self, cats: Vec<String>) -> Self
pub fn enable_categories(self, cats: Vec<String>) -> Self
Sets the allowlist of enabled categories (replaces any blocklist).
Sourcepub fn load_library(self, path: &str) -> Self
pub fn load_library(self, path: &str) -> Self
Adds a query library path.
Sourcepub fn inline_query(self, name: &str, expr: &str, desc: Option<&str>) -> Self
pub fn inline_query(self, name: &str, expr: &str, desc: Option<&str>) -> Self
Adds an inline query.
Sourcepub fn config(self, config: EngineConfig) -> Self
pub fn config(self, config: EngineConfig) -> Self
Applies an EngineConfig (merges into the builder’s config).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EngineBuilder
impl RefUnwindSafe for EngineBuilder
impl Send for EngineBuilder
impl Sync for EngineBuilder
impl Unpin for EngineBuilder
impl UnwindSafe for EngineBuilder
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> 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