pub struct ArchiveSource {
pub url: Url,
pub hash: String,
}
Expand description
Describes where to obtain a particular archive.
Fields§
§url: Url
A URL from where the archive may be obtained.
hash: String
The expected SHA256 hash of the archive, encoded as ASCII lowercase hexadecimal digits.
If you download this archive, hash it and compare the result to this value, so you can tell whether you got the right file.
Implementations§
Source§impl ArchiveSource
impl ArchiveSource
Sourcepub fn new(url: Url, hash: String) -> ArchiveSource
pub fn new(url: Url, hash: String) -> ArchiveSource
Create a new ArchiveSource for the given URL and hash.
url
is a URL from where the archive may be obtained.
hash
is the expected SHA256 hash of the archive,
encoded as ASCII lowercase hexadecimal digits.
let pkg = rust_release_channel::ArchiveSource::new(
"https://example.com/rust/archive.tar.gz".parse()?,
"867f3496607caeb969dabcd0083d35e010591bc2a9105af4f6c34289750c8b95"
.into(),
);
Trait Implementations§
Source§impl Clone for ArchiveSource
impl Clone for ArchiveSource
Source§fn clone(&self) -> ArchiveSource
fn clone(&self) -> ArchiveSource
Returns a copy 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 ArchiveSource
impl Debug for ArchiveSource
Source§impl Display for ArchiveSource
impl Display for ArchiveSource
Source§impl Hash for ArchiveSource
impl Hash for ArchiveSource
Source§impl Ord for ArchiveSource
impl Ord for ArchiveSource
Source§fn cmp(&self, other: &ArchiveSource) -> Ordering
fn cmp(&self, other: &ArchiveSource) -> Ordering
1.21.0 · 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 ArchiveSource
impl PartialEq for ArchiveSource
Source§impl PartialOrd for ArchiveSource
impl PartialOrd for ArchiveSource
impl Eq for ArchiveSource
impl StructuralPartialEq for ArchiveSource
Auto Trait Implementations§
impl Freeze for ArchiveSource
impl RefUnwindSafe for ArchiveSource
impl Send for ArchiveSource
impl Sync for ArchiveSource
impl Unpin for ArchiveSource
impl UnwindSafe for ArchiveSource
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