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§
Sourcefn validate_lua_version(&self, lua_version: &Version) -> Result<(), Error>
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.
Sourcefn validate_lua_version_from_config(&self, config: &Config) -> Result<(), Error>
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.
Sourcefn lua_version_matches(&self, config: &Config) -> Result<Version, Error>
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.
Sourcefn supports_lua_version(&self, lua_version: &Version) -> bool
fn supports_lua_version(&self, lua_version: &Version) -> bool
Checks if the rockspec supports the given lua version.
Sourcefn lua_version(&self) -> Option<Version>
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".