pub struct Version {
pub major: u16,
pub minor: u16,
}Expand description
Semantic version with major.minor components.
Packed as (major << 16) | minor for binary format compatibility (4 bytes LE).
Serialized to/from JSON as a "major.minor" string (e.g. "1.0").
Fields§
§major: u16§minor: u16Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Version
Deserializes from a "major.minor" string (e.g. "1.0").
impl<'de> Deserialize<'de> for Version
Deserializes from a "major.minor" string (e.g. "1.0").
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
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