pub struct Version {
pub major: u8,
pub minor: u8,
pub build: u8,
pub beta: u8,
}Expand description
A VEXos firmware version.
This type represents a version identifier for VEXos firmware. VEXos is versioned using a
slightly modified semantic versioning scheme. To check the version currently running on a
brain, use system_version.
This type implements PartialOrd, meaning it can be compared to other instances of itself.
§Example
use vexide::os::{Version, system_version};
// VEXos 1.1.5b0
const VEXOS_1_1_5_0: Version = Version {
major: 1,
minor: 1,
build: 5,
beta: 0,
};
// Get the currently running VEXos version
let version = system_version();
if version < VEXOS_1_1_5_0 {
println!("Update your firmware!");
}Fields§
§major: u8The major version
minor: u8The minor version
build: u8The build version
beta: u8The beta version
Trait Implementations§
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)