pub struct ConfigBuilder { /* private fields */ }Implementations§
Source§impl ConfigBuilder
A builder for the lux Config.
impl ConfigBuilder
A builder for the lux Config.
Sourcepub fn new() -> Result<Self, ConfigError>
pub fn new() -> Result<Self, ConfigError>
Create a new ConfigBuilder from a config file by deserializing from a config file
if present, or otherwise by instantiating the default config.
Sourcepub fn config_file() -> Result<PathBuf, NoValidHomeDirectory>
pub fn config_file() -> Result<PathBuf, NoValidHomeDirectory>
Get the path to the lux config file.
pub fn dev(self, dev: Option<bool>) -> Self
pub fn server(self, server: Option<Url>) -> Self
pub fn extra_servers(self, extra_servers: Option<Vec<Url>>) -> Self
pub fn only_sources(self, sources: Option<String>) -> Self
pub fn namespace(self, namespace: Option<String>) -> Self
pub fn lua_dir(self, lua_dir: Option<PathBuf>) -> Self
pub fn lua_version(self, lua_version: Option<LuaVersion>) -> Self
pub fn user_tree(self, tree: Option<PathBuf>) -> Self
pub fn variables(self, variables: Option<HashMap<String, String>>) -> Self
pub fn verbose(self, verbose: Option<bool>) -> Self
pub fn no_progress(self, no_progress: Option<bool>) -> Self
pub fn timeout(self, timeout: Option<Duration>) -> Self
pub fn max_jobs(self, max_jobs: Option<usize>) -> Self
pub fn cache_dir(self, cache_dir: Option<PathBuf>) -> Self
pub fn data_dir(self, data_dir: Option<PathBuf>) -> Self
pub fn vendor_dir(self, vendor_dir: Option<PathBuf>) -> Self
pub fn entrypoint_layout(self, rock_layout: RockLayoutConfig) -> Self
pub fn generate_luarc(self, generate: Option<bool>) -> Self
pub fn build(self) -> Result<Config, ConfigError>
Trait Implementations§
Source§impl Clone for ConfigBuilder
impl Clone for ConfigBuilder
Source§fn clone(&self) -> ConfigBuilder
fn clone(&self) -> ConfigBuilder
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 Default for ConfigBuilder
impl Default for ConfigBuilder
Source§fn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigBuilder
impl<'de> Deserialize<'de> for ConfigBuilder
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
Source§impl From<Config> for ConfigBuilder
Useful for printing the current config
impl From<Config> for ConfigBuilder
Useful for printing the current config
Source§impl Serialize for ConfigBuilder
impl Serialize for ConfigBuilder
Source§impl UserData for ConfigBuilder
impl UserData for ConfigBuilder
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Adds custom methods and operators specific to this userdata.
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Adds custom fields specific to this userdata.
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Registers this type for use in Lua. Read more
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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 moreSource§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
Source§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.
unsafe fn push_into_stack_multi(self, lua: &RawLua) -> Result<i32, Error>
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> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
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
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.