pub struct Version { /* private fields */ }
Expand description
LLVM version representation
The Version
struct encapsulates the major, minor, and patch components of the LLVM version.
This struct provides methods to initialize and retrieve the version information.
Implementations§
Source§impl Version
impl Version
Sourcepub fn new() -> Self
pub fn new() -> Self
Init and return current LLVM version
§Details
Initializes and returns the current LLVM version.
This method queries the LLVM library for its version information and returns a Version
instance
containing the major, minor, and patch components of the LLVM version.
§Returns
A Version
instance with the current LLVM version.
§Example
let llvm_version = Version::new();
Sourcepub const fn get(&self) -> (u32, u32, u32)
pub const fn get(&self) -> (u32, u32, u32)
Return LLVM version data: (major, minor, patch)
§Details
Returns the LLVM version as a tuple (major, minor, patch)
.
This method provides access to the individual components of the LLVM version stored in this Version
instance.
§Returns
A tuple (u32, u32, u32)
representing the major, minor, and patch components of the LLVM version.
§Example
let llvm_version = Version::new();
let (major, minor, patch) = llvm_version.get();