pubgrub/
package.rs

1// SPDX-License-Identifier: MPL-2.0
2
3//! Trait for identifying packages.
4//! Automatically implemented for traits implementing
5//! [Clone] + [Eq] + [Hash] + [Debug] + [Display].
6
7use std::fmt::{Debug, Display};
8use std::hash::Hash;
9
10/// Trait for identifying packages.
11/// Automatically implemented for types already implementing
12/// [Clone] + [Eq] + [Hash] + [Debug] + [Display].
13pub trait Package: Clone + Eq + Hash + Debug + Display {}
14
15/// Automatically implement the Package trait for any type
16/// that already implement [Clone] + [Eq] + [Hash] + [Debug] + [Display].
17impl<T: Clone + Eq + Hash + Debug + Display> Package for T {}