Struct crates_index::Version
source · pub struct Version { /* private fields */ }
Expand description
A single version of a crate (package) published to the index
Implementations§
source§impl Version
impl Version
sourcepub fn dependencies(&self) -> &[Dependency]
pub fn dependencies(&self) -> &[Dependency]
Dependencies for this version
sourcepub fn checksum(&self) -> &[u8; 32]
pub fn checksum(&self) -> &[u8; 32]
Checksum of the package for this version
SHA256 of the .crate file
sourcepub fn features(&self) -> &HashMap<String, Vec<String>>
pub fn features(&self) -> &HashMap<String, Vec<String>>
Explicit features this crate has. This list is not exhaustive, because any optional dependency becomes a feature automatically.
default
is a special feature name for implicitly enabled features.
sourcepub fn links(&self) -> Option<&str>
pub fn links(&self) -> Option<&str>
Exclusivity flag. If this is a sys crate, it informs it conflicts with any other crate with the same links string.
It does not involve linker or libraries in any way.
sourcepub fn rust_version(&self) -> Option<&str>
pub fn rust_version(&self) -> Option<&str>
Required version of rust
Corresponds to package.rust-version
.
Added in 2023 (see https://github.com/rust-lang/crates.io/pull/6267),
can be None
if published before then or if not set in the manifest.
sourcepub fn download_url(&self, index: &IndexConfig) -> Option<String>
pub fn download_url(&self, index: &IndexConfig) -> Option<String>
Where to find crate tarball
Trait Implementations§
source§impl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
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
Auto Trait Implementations§
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