Module emf_core_base_rs_ffi::version [−][src]
Version api.
Example
use emf_core_base_rs_ffi::sys::api::SysBinding; use emf_core_base_rs_ffi::version::api::VersionBinding; use emf_core_base_rs_ffi::collections::{NonNullConst, ConstSpan}; unsafe { // `base_interface` has the type `&mut dyn CBaseBinding`. let v1 = VersionBinding::new_short(base_interface, 1, 2, 3); let v2_string = ConstSpan::from("1.2.3-beta.5+54845652"); let v2 = match VersionBinding::from_string( base_interface, NonNullConst::from(&v2_string) ).to_result() { Ok(v) => v, Err(_) => { SysBinding::lock(base_interface); SysBinding::panic( base_interface, Some(NonNullConst::from(b"Could not construct from string.\0")) ); SysBinding::unlock(base_interface); } }; if VersionBinding::compare_weak( base_interface, NonNullConst::from(&v1), NonNullConst::from(&v2)) != 0 { SysBinding::lock(base_interface); SysBinding::panic( base_interface, Some(NonNullConst::from(b"Should not happen.\0")) ); SysBinding::unlock(base_interface); } }
Modules
api | Version api. |
Structs
Version | A version. |
Enums
Error | Errors of the version api. |
ReleaseType | Errors of the version api. |
Constants
VERSION_BUILD | Build number of the targeted version. |
VERSION_MAJOR | Major version of the targeted version. |
VERSION_MINOR | Minor version of the targeted version. |
VERSION_PATCH | Patch version of the targeted version. |
VERSION_RELEASE_NUMBER | Release number of the targeted version. |
VERSION_RELEASE_TYPE | Release type of the targeted version. |
VERSION_STRING | Version string of the targeted version. |