pub struct BuiltinsEnv {
pub templates_dir: Option<PathBuf>,
pub database: Option<PathBuf>,
pub sqlite: SqlitePragmas,
pub cache: Option<Cache>,
pub fetch: FetchOptions,
pub env: EnvOptions,
}Expand description
External resources required by some builtins: template needs a
templates directory and db a SQLite database file.
Fields§
§templates_dir: Option<PathBuf>Directory the template builtin loads templates from.
database: Option<PathBuf>SQLite database file the db builtin connects to.
sqlite: SqlitePragmasConnection pragmas applied to that database.
cache: Option<Cache>The shared cache backing nitr.cache. Built once by the server and
handed to every state, so it survives a pool rebuild — a cache that
empties on every reload is a cache that never warms.
fetch: FetchOptionsOutbound-request policy for the fetch builtin.
env: EnvOptionsRead policy for the nitr.env builtin.
Trait Implementations§
Source§impl Clone for BuiltinsEnv
impl Clone for BuiltinsEnv
Source§fn clone(&self) -> BuiltinsEnv
fn clone(&self) -> BuiltinsEnv
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 BuiltinsEnv
impl Debug for BuiltinsEnv
Source§impl Default for BuiltinsEnv
impl Default for BuiltinsEnv
Source§fn default() -> BuiltinsEnv
fn default() -> BuiltinsEnv
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BuiltinsEnv
impl RefUnwindSafe for BuiltinsEnv
impl Send for BuiltinsEnv
impl Sync for BuiltinsEnv
impl Unpin for BuiltinsEnv
impl UnsafeUnpin for BuiltinsEnv
impl UnwindSafe for BuiltinsEnv
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