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,
pub cookie_secure: bool,
pub cookie_insecure_warning: Option<String>,
}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.
Whether cookies Nitr builds carry Secure when the caller’s own
options table does not say. Resolved by the server from
[cookies] secure and [tls] enabled.
false in Default deliberately: an embedder who never sets one,
and nitr hash-password, keep exactly today’s behaviour.
Why a cookie built without Secure is worth a warning, logged once
by the first such cookie; None when the server has nothing to say.
Trait Implementations§
Source§impl Clone for BuiltinsEnv
impl Clone for BuiltinsEnv
Source§impl Debug for BuiltinsEnv
impl Debug for BuiltinsEnv
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
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