pub trait LuaVersionCompatibility {
// Required methods
fn validate_lua_version(
&self,
config: &Config,
) -> Result<(), LuaVersionError>;
fn lua_version_matches(
&self,
config: &Config,
) -> Result<LuaVersion, LuaVersionError>;
fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool;
fn lua_version(&self) -> Option<LuaVersion>;
}
Required Methods§
Sourcefn validate_lua_version(&self, config: &Config) -> Result<(), LuaVersionError>
fn validate_lua_version(&self, config: &Config) -> Result<(), LuaVersionError>
Ensures that the rockspec is compatible with the lua version established in the config. Returns an error if the rockspec is not compatible.
Sourcefn lua_version_matches(
&self,
config: &Config,
) -> Result<LuaVersion, LuaVersionError>
fn lua_version_matches( &self, config: &Config, ) -> Result<LuaVersion, LuaVersionError>
Ensures that the rockspec is compatible with the lua version established in the config, and returns the lua version from the config if it is compatible.
Sourcefn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool
Checks if the rockspec supports the given lua version.
Sourcefn lua_version(&self) -> Option<LuaVersion>
fn lua_version(&self) -> Option<LuaVersion>
Returns the lua version required by the rockspec.