pub struct Version {
pub major: u8,
pub minor: u8,
pub build: u8,
}
Expand description
D2XX version structure.
Note this is not a SemVer. SemVer defines the last number as the patch number, whereas FTDI uses it as a build number.
This is returned by library_version
and driver_version
.
Fields§
§major: u8
Major version.
minor: u8
Minor version.
build: u8
Build number.
Implementations§
source§impl Version
impl Version
sourcepub const fn new(major: u8, minor: u8, build: u8) -> Version
pub const fn new(major: u8, minor: u8, build: u8) -> Version
Create a new version structure from decimal values.
§Example
use libftd2xx::Version;
let version = Version::new(3, 1, 15);
assert_eq!(
version,
Version {
major: 3,
minor: 1,
build: 15
}
);
Trait Implementations§
source§impl Ord for Version
impl Ord for Version
source§impl PartialEq for Version
impl PartialEq for Version
source§impl PartialOrd for Version
impl PartialOrd for Version
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
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