pub struct LuaConvention {
pub extension: &'static str,
pub init_name: &'static str,
pub module_separator: char,
}Expand description
Configuration bundle for Lua dialect naming conventions.
Apply to FsResolver and
PrefixResolver via with_convention()
to prevent convention settings from scattering.
Individual with_extension() / with_init_name() / with_separator()
methods remain available. Calling them after with_convention() overrides
the corresponding field.
§Predefined conventions
Fields§
§extension: &'static strFile extension ("lua", "luau", etc.).
init_name: &'static strPackage entry point name ("init", "mod", etc.).
module_separator: charModule name separator. The . in require("a.b").
Implementations§
Trait Implementations§
Source§impl Clone for LuaConvention
impl Clone for LuaConvention
Source§fn clone(&self) -> LuaConvention
fn clone(&self) -> LuaConvention
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 Debug for LuaConvention
impl Debug for LuaConvention
Source§impl Default for LuaConvention
impl Default for LuaConvention
Source§impl PartialEq for LuaConvention
impl PartialEq for LuaConvention
impl Copy for LuaConvention
impl Eq for LuaConvention
impl StructuralPartialEq for LuaConvention
Auto Trait Implementations§
impl Freeze for LuaConvention
impl RefUnwindSafe for LuaConvention
impl Send for LuaConvention
impl Sync for LuaConvention
impl Unpin for LuaConvention
impl UnsafeUnpin for LuaConvention
impl UnwindSafe for LuaConvention
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> 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