pub trait UserData<U> {
// Required methods
fn user_data(&self) -> &U;
fn user_data_mut(&mut self) -> &mut U;
// Provided method
fn set_user_data(&mut self, v: U) { ... }
}
pub trait UserData<U> {
// Required methods
fn user_data(&self) -> &U;
fn user_data_mut(&mut self) -> &mut U;
// Provided method
fn set_user_data(&mut self, v: U) { ... }
}