pub struct Release {
pub version: String,
pub url: String,
pub pgpsigurl: Option<String>,
pub target_filename: Option<String>,
pub package_version: Option<String>,
}Expand description
A discovered release from an upstream source
Fields§
§version: StringThe version string of the release (after uversionmangle)
url: StringThe URL to download the release tarball (after downloadurlmangle)
pgpsigurl: Option<String>Optional URL to the PGP signature file
target_filename: Option<String>Optional target filename for the downloaded tarball (from filenamemangle)
package_version: Option<String>Optional Debian package version (from oversionmangle, e.g., “1.0+dfsg”)
Implementations§
Source§impl Release
impl Release
Sourcepub fn new(
version: impl Into<String>,
url: impl Into<String>,
pgpsigurl: Option<String>,
) -> Self
pub fn new( version: impl Into<String>, url: impl Into<String>, pgpsigurl: Option<String>, ) -> Self
Create a new Release
§Examples
use debian_watch::Release;
let release = Release::new("1.0.0", "https://example.com/project-1.0.0.tar.gz", None);
assert_eq!(release.version, "1.0.0");
assert_eq!(release.url, "https://example.com/project-1.0.0.tar.gz");Sourcepub fn new_full(
version: impl Into<String>,
url: impl Into<String>,
pgpsigurl: Option<String>,
target_filename: Option<String>,
package_version: Option<String>,
) -> Self
pub fn new_full( version: impl Into<String>, url: impl Into<String>, pgpsigurl: Option<String>, target_filename: Option<String>, package_version: Option<String>, ) -> Self
Create a new Release with all fields
§Examples
use debian_watch::Release;
let release = Release::new_full(
"1.0.0",
"https://example.com/project-1.0.0.tar.gz",
Some("https://example.com/project-1.0.0.tar.gz.asc".to_string()),
Some("myproject_1.0.0.orig.tar.gz".to_string()),
Some("1.0.0+dfsg".to_string()),
);
assert_eq!(release.version, "1.0.0");
assert_eq!(release.target_filename, Some("myproject_1.0.0.orig.tar.gz".to_string()));Trait Implementations§
Source§impl Ord for Release
impl Ord for Release
Source§impl PartialOrd for Release
impl PartialOrd for Release
impl Eq for Release
impl StructuralPartialEq for Release
Auto Trait Implementations§
impl Freeze for Release
impl RefUnwindSafe for Release
impl Send for Release
impl Sync for Release
impl Unpin for Release
impl UnwindSafe for Release
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