Trait LuaVersionCompatibility

Source
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§

Source

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.

Source

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.

Source

fn supports_lua_version(&self, lua_version: &LuaVersion) -> bool

Checks if the rockspec supports the given lua version.

Source

fn lua_version(&self) -> Option<LuaVersion>

Returns the lua version required by the rockspec.

Implementors§