pub struct VersionInfo {
pub version: String,
pub prerelease: bool,
pub release_date: Option<String>,
pub release_notes: Option<String>,
pub download_url: Option<String>,
pub checksum: Option<String>,
pub file_size: Option<u64>,
pub metadata: HashMap<String, String>,
}
Expand description
Information about a tool version
Fields§
§version: String
Version string (e.g., “1.2.3”)
prerelease: bool
Whether this is a prerelease version
release_date: Option<String>
Release date in ISO format
release_notes: Option<String>
Release notes or description
download_url: Option<String>
Download URL for this version
checksum: Option<String>
Checksum for verification
file_size: Option<u64>
File size in bytes
metadata: HashMap<String, String>
Additional metadata
Implementations§
Source§impl VersionInfo
impl VersionInfo
Sourcepub fn new(version: impl Into<String>) -> Self
pub fn new(version: impl Into<String>) -> Self
Create a new VersionInfo with minimal information
Sourcepub fn with_url(
version: impl Into<String>,
download_url: impl Into<String>,
) -> Self
pub fn with_url( version: impl Into<String>, download_url: impl Into<String>, ) -> Self
Create a new VersionInfo with download URL
Sourcepub fn as_prerelease(self) -> Self
pub fn as_prerelease(self) -> Self
Mark this version as a prerelease
Sourcepub fn with_release_date(self, date: impl Into<String>) -> Self
pub fn with_release_date(self, date: impl Into<String>) -> Self
Set release date
Sourcepub fn with_release_notes(self, notes: impl Into<String>) -> Self
pub fn with_release_notes(self, notes: impl Into<String>) -> Self
Set release notes
Sourcepub fn with_checksum(self, checksum: impl Into<String>) -> Self
pub fn with_checksum(self, checksum: impl Into<String>) -> Self
Set checksum
Sourcepub fn with_file_size(self, size: u64) -> Self
pub fn with_file_size(self, size: u64) -> Self
Set file size
Trait Implementations§
Source§impl Clone for VersionInfo
impl Clone for VersionInfo
Source§fn clone(&self) -> VersionInfo
fn clone(&self) -> VersionInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 VersionInfo
impl Debug for VersionInfo
Source§impl<'de> Deserialize<'de> for VersionInfo
impl<'de> Deserialize<'de> for VersionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VersionInfo
impl PartialEq for VersionInfo
Source§impl Serialize for VersionInfo
impl Serialize for VersionInfo
impl Eq for VersionInfo
impl StructuralPartialEq for VersionInfo
Auto Trait Implementations§
impl Freeze for VersionInfo
impl RefUnwindSafe for VersionInfo
impl Send for VersionInfo
impl Sync for VersionInfo
impl Unpin for VersionInfo
impl UnwindSafe for VersionInfo
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