Files
flipper/packer/src/types.rs
Pascal Hartig 5cc9af4b5d Hashing and Manifest
Summary: Hashes the artifacts and adds the information to a manifest. This will then be used to upload to a blob store, and save the information so it can be retrieved again later. Not sure if I want to stick with SHA256 or if there's something more efficient like Cityhash, given that we don't really care about cryptographic properties here.

Reviewed By: jknoxville

Differential Revision: D21380369

fbshipit-source-id: e9c5cd56d94f3083ae5ed6396673d00cbf98ce39
2020-05-07 07:22:51 -07:00

47 lines
917 B
Rust

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use clap::arg_enum;
use std::fmt::{self, Display};
arg_enum! {
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Platform {
Mac,
Linux,
Windows
}
}
#[derive(
Debug,
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
serde::Deserialize,
serde::Serialize
)]
#[serde(rename_all = "lowercase")]
pub enum PackType {
Frameworks,
Core,
}
impl Display for PackType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use PackType::*;
match *self {
Frameworks => write!(f, "frameworks"),
Core => write!(f, "core"),
}
}
}