pub struct FirmwareVersion { /* private fields */ }Expand description
A parsed, comparable Bambu firmware version.
Equality and ordering are defined on the normalised numeric components
(trailing zero components dropped), so 01.05 and 01.05.00.00 compare
equal. The original string is preserved for fmt::Display.
Implementations§
Source§impl FirmwareVersion
impl FirmwareVersion
Sourcepub fn parse(s: &str) -> Result<Self, ParseFirmwareError>
pub fn parse(s: &str) -> Result<Self, ParseFirmwareError>
Parse a firmware version string such as "01.05.00.00" (an optional
leading v/V is accepted).
Sourcepub fn components(&self) -> &[u32]
pub fn components(&self) -> &[u32]
The normalised numeric components (trailing zeros removed).
Trait Implementations§
Source§impl Clone for FirmwareVersion
impl Clone for FirmwareVersion
Source§fn clone(&self) -> FirmwareVersion
fn clone(&self) -> FirmwareVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FirmwareVersion
impl Debug for FirmwareVersion
Source§impl Display for FirmwareVersion
impl Display for FirmwareVersion
impl Eq for FirmwareVersion
Source§impl FromStr for FirmwareVersion
impl FromStr for FirmwareVersion
Source§impl Hash for FirmwareVersion
impl Hash for FirmwareVersion
Source§impl Ord for FirmwareVersion
impl Ord for FirmwareVersion
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FirmwareVersion
impl PartialEq for FirmwareVersion
Source§impl PartialOrd for FirmwareVersion
impl PartialOrd for FirmwareVersion
Auto Trait Implementations§
impl Freeze for FirmwareVersion
impl RefUnwindSafe for FirmwareVersion
impl Send for FirmwareVersion
impl Sync for FirmwareVersion
impl Unpin for FirmwareVersion
impl UnsafeUnpin for FirmwareVersion
impl UnwindSafe for FirmwareVersion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.