macro_rules! require_api {
($major:literal, $minor:literal) => { ... };
}Expand description
Check that your code is compatible with the current Telex API version.
For pre-1.0 versions (0.x.y), this requires an exact major.minor match, since breaking changes can occur on minor version bumps.
For 1.0+ versions, this requires the same major version and that your required minor version is not newer than the library’s minor version.
§Example
ⓘ
use telex::prelude::*;
telex::require_api!(0, 2); // Requires API version 0.2.x
fn main() {
telex::run(App).unwrap();
}If the version doesn’t match, you’ll get a compile-time error with guidance on how to migrate.