use rattler_digest::{Md5Hash, Sha256Hash};
use typed_path::Utf8TypedPathBuf;
use url::Url;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum SourceLocation {
Url(UrlSourceLocation),
Git(GitSourceLocation),
Path(PathSourceLocation),
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct UrlSourceLocation {
pub url: Url,
pub md5: Option<Md5Hash>,
pub sha256: Option<Sha256Hash>,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GitSourceLocation {
pub git: Url,
pub rev: Option<GitReference>,
pub subdirectory: Option<String>,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum GitReference {
Branch(String),
Tag(String),
Rev(String),
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PathSourceLocation {
pub path: Utf8TypedPathBuf,
}