A library for writing host-specific, single-binary configuration management and deployment tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
513 B

use crate::resources::Resource;
pub trait ToArtifact {
type Artifact;
}
macro_rules! to_artifact {
( $($name:ident)* ) => (
#[allow(non_snake_case)]
impl<$($name: Resource,)*> ToArtifact for ($($name,)*)
{
type Artifact = ($($name::Artifact,)*);
}
);
}
for_each_tuple!(to_artifact);
impl<T: Resource> ToArtifact for Option<T> {
type Artifact = Option<T::Artifact>;
}
impl<T: Resource> ToArtifact for T {
type Artifact = <Self as Resource>::Artifact;
}