//! Meta-information about the Cargo workspace in the user repository.


/// A crate in your repository's workspace.
///
/// You will want to collect this type via `cicero::workspace!()`.
/// For technical reasons, it is possible to construct this type manually,
/// but this is not officially supported, so more fields may be added between updates,
/// without this being deemed a breaking change.
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Package {
    /// The name as defined in the `[package]` section of the `Cargo.toml`.
    pub name: &'static str,
}

impl std::fmt::Display for Package {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.name)
    }
}
