[][src]Struct rvn::MavenCoordinates

pub struct MavenCoordinates<'a> {
    pub group_id: &'a str,
    pub artifact_id: &'a str,
    pub packaging: Option<&'a str>,
    pub classifier: Option<&'a str>,
    pub version: &'a str,

A parsed Maven coordinates record.


group_id: &'a strartifact_id: &'a strpackaging: Option<&'a str>classifier: Option<&'a str>version: &'a str


impl<'a> MavenCoordinates<'a>[src]

pub fn parse(maven_coordinates: &str) -> Result<MavenCoordinates, Error>[src]

Parse the Maven coordinates from a string.


use rvn::MavenCoordinates;

let coordinates = MavenCoordinates::parse("com.fasterxml.jackson.core:jackson-annotations:2.9.9").unwrap();

pub fn fetch_checksum(
    repository: &str,
    algorithm: &str
) -> Result<String, Error>

Fetch the checksum associated with the Maven coordinates.


use rvn::MavenCoordinates;

let repository = "https://repo1.maven.org/maven2";
let algorithm = "sha1";
let coordinates = MavenCoordinates::parse("com.fasterxml.jackson.core:jackson-annotations:jar:sources:2.9.9").unwrap();
let checksum = coordinates.fetch_checksum(repository, "sha1").unwrap();

assert_eq!(checksum, "4ac77aa5799fcf00a9cde00cd7da4d08bdc038ff")

Trait Implementations

impl<'a> Clone for MavenCoordinates<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> PartialEq<MavenCoordinates<'a>> for MavenCoordinates<'a>[src]

impl<'a> Eq for MavenCoordinates<'a>[src]

impl<'a> Debug for MavenCoordinates<'a>[src]

Auto Trait Implementations

impl<'a> Send for MavenCoordinates<'a>

impl<'a> Sync for MavenCoordinates<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err