Struct rust_release_channel::ArchiveSource [−][src]
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.
Methods
impl ArchiveSource
[src]
impl ArchiveSource
pub fn new(url: Url, hash: String) -> ArchiveSource
[src]
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
impl Debug for ArchiveSource
[src]
impl Debug for ArchiveSource
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ArchiveSource
[src]
impl Clone for ArchiveSource
fn clone(&self) -> ArchiveSource
[src]
fn clone(&self) -> ArchiveSource
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ArchiveSource
[src]
impl PartialEq for ArchiveSource
fn eq(&self, other: &ArchiveSource) -> bool
[src]
fn eq(&self, other: &ArchiveSource) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ArchiveSource) -> bool
[src]
fn ne(&self, other: &ArchiveSource) -> bool
This method tests for !=
.
impl Eq for ArchiveSource
[src]
impl Eq for ArchiveSource
impl PartialOrd for ArchiveSource
[src]
impl PartialOrd for ArchiveSource
fn partial_cmp(&self, other: &ArchiveSource) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ArchiveSource) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ArchiveSource) -> bool
[src]
fn lt(&self, other: &ArchiveSource) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ArchiveSource) -> bool
[src]
fn le(&self, other: &ArchiveSource) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &ArchiveSource) -> bool
[src]
fn gt(&self, other: &ArchiveSource) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ArchiveSource) -> bool
[src]
fn ge(&self, other: &ArchiveSource) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for ArchiveSource
[src]
impl Ord for ArchiveSource
fn cmp(&self, other: &ArchiveSource) -> Ordering
[src]
fn cmp(&self, other: &ArchiveSource) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for ArchiveSource
[src]
impl Hash for ArchiveSource
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for ArchiveSource
[src]
impl Display for ArchiveSource
Auto Trait Implementations
impl Send for ArchiveSource
impl Send for ArchiveSource
impl Sync for ArchiveSource
impl Sync for ArchiveSource