named-item 0.6.0

A crate providing traits for managing named items, including support for aliases, name history, validation, and more.
Documentation
1
2
3
4
5
6
7
8
9
10
crate::ix!();

/// Trait for resetting the name of an item to its default.
pub trait ResetName: SetName + DefaultName {

    /// Resets the name to the default, handling potential errors.
    fn reset_name(&mut self) -> Result<(), NameError> {
        self.set_name(&Self::default_name())
    }
}