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
// 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 {
panic!("Update your firmware!");
}
Fields§
§major: u8
The major version
minor: u8
The minor version
build: u8
The build version
beta: u8
The 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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more