pub struct Config { /* private fields */ }Expand description
The resolved configuration for a Lux session.
Can be constructed via ConfigBuilder, which supports layering multiple
configuration sources (config file, CLI flags, environment variables).
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_lua_version(self, lua_version: LuaVersion) -> Self
pub fn with_lua_version(self, lua_version: LuaVersion) -> Self
Create a copy of this config for the specified Lua version
Sourcepub fn with_tree(self, tree: PathBuf) -> Self
pub fn with_tree(self, tree: PathBuf) -> Self
Create a copy of this config with the specified install tree
Sourcepub fn extra_servers(&self) -> &Vec<Url>
pub fn extra_servers(&self) -> &Vec<Url>
Additional luarocks repository servers
Sourcepub fn enabled_dev_servers(&self) -> Result<Vec<Url>, ConfigError>
pub fn enabled_dev_servers(&self) -> Result<Vec<Url>, ConfigError>
Enabled luarocks repository servers that provide dev/scm rocks
Sourcepub fn lua_dir(&self) -> Option<&PathBuf>
pub fn lua_dir(&self) -> Option<&PathBuf>
The directory in which to install Lua{n} if not found
pub fn lua_version(&self) -> Option<&LuaVersion>
Sourcepub fn user_tree(&self, version: LuaVersion) -> Result<Tree, TreeError>
pub fn user_tree(&self, version: LuaVersion) -> Result<Tree, TreeError>
The tree in which to install rocks.
If installing packages for a project, use Project::tree instead.
Sourcepub fn no_progress(&self) -> bool
pub fn no_progress(&self) -> bool
Whether to disable printing progress bars and spinners
Sourcepub fn timeout(&self) -> &Duration
pub fn timeout(&self) -> &Duration
Timeout on network operations, in seconds. 0 means no timeout (wait forever).
Sourcepub fn max_jobs(&self) -> usize
pub fn max_jobs(&self) -> usize
Maximum buffer size for parallel jobs, such as downloading rockspecs and installing rocks. 0 means no limit.
Sourcepub fn variables(&self) -> &HashMap<String, String>
pub fn variables(&self) -> &HashMap<String, String>
Variable names, mapped to their values.
Lux populates variables in the lux.toml and in RockSpecs
with these before building.
pub fn external_deps(&self) -> &ExternalDependencySearchConfig
Sourcepub fn entrypoint_layout(&self) -> &RockLayoutConfig
pub fn entrypoint_layout(&self) -> &RockLayoutConfig
The rock layout for entrypoints of new install trees. Does not affect existing install trees or dependency rock layouts.
Sourcepub fn vendor_dir(&self) -> Option<&PathBuf>
pub fn vendor_dir(&self) -> Option<&PathBuf>
Specifies a directory with locally vendored sources and RockSpecs.
When building or installing a package with this flag,
Lux will fetch sources from the
Sourcepub fn user_agent(&self) -> &str
pub fn user_agent(&self) -> &str
The user agent to use when making web requests.
Sourcepub fn generate_luarc(&self) -> bool
pub fn generate_luarc(&self) -> bool
Whether to generate a .luarc.json on build.
Sourcepub fn wrap_bin_scripts(&self) -> bool
pub fn wrap_bin_scripts(&self) -> bool
Whether to wrap installed Lua bin scripts to be executed with
the detected or configured Lua installation.
If true, individual rocks can still disable wrapping of their own bin scripts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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 moreimpl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.