Skip to main content

SetName

Trait SetName 

Source
pub trait SetName {
    // Required method
    fn set_name(&mut self, name: &str) -> Result<(), NameError>;
}
Expand description

Trait for setting the name of an item with error handling.

Required Methods§

Source

fn set_name(&mut self, name: &str) -> Result<(), NameError>

Sets the name of the item. Returns a Result to handle invalid inputs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§