pub trait TryUpdateFrom<T> {
type Error;
fn try_update_from(&mut self, value: T) -> Result<(), Self::Error> {
self.check_try_update_from(&value)?;
unsafe {
self.update_from_unchecked(value);
}
Ok(())
}
fn check_try_update_from(&self, value: &T) -> Result<(), Self::Error>;
unsafe fn update_from_unchecked(&mut self, value: T);
}