Skip to main content

LuaVersionCompatibility

Trait LuaVersionCompatibility 

Source
pub trait LuaVersionCompatibility {
    // Required methods
    fn validate_lua_version(&self, lua_version: &Version) -> Result<(), Error>;
    fn validate_lua_version_from_config(
        &self,
        config: &Config,
    ) -> Result<(), Error>;
    fn lua_version_matches(&self, config: &Config) -> Result<Version, Error>;
    fn supports_lua_version(&self, lua_version: &Version) -> bool;
    fn lua_version(&self) -> Option<Version>;
}

Required Methods§

Source

fn validate_lua_version(&self, lua_version: &Version) -> Result<(), Error>

Ensures that the rockspec is compatible with the specified lua version. Returns an error if the rockspec is not compatible.

Source

fn validate_lua_version_from_config(&self, config: &Config) -> Result<(), Error>

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<Version, Error>

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: &Version) -> bool

Checks if the rockspec supports the given lua version.

Source

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

Returns the lua version required by the rockspec.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§