pub fn try_update_error(&self, e: SharedPeerError) -> Result<(), AlreadyErrored> {
        let mut guard = self.0.lock().expect("error mutex should be unpoisoned");

        if let Some(original_error) = guard.clone() {
            Err(AlreadyErrored { original_error })
        } else {
            *guard = Some(e);
            Ok(())
        }
    }
/// Update the current error in the slot.
///
/// Returns `Err(AlreadyErrored)` if there was already an error in the slot.
///
/// # Correctness
///
/// Briefly locks the error slot's threaded `std::sync::Mutex`, to check for
/// a previous error, then update the error in the slot.
Update the current error in the slot.
Returns `Err(AlreadyErrored)` if there was already an error in the slot.
Update the current error in the slot . Returns ` Err ( AlreadyErrored ) ` if there was already an error in the slot .
pub fn try_update_error(&self, e: SharedPeerError) -> Result<(), AlreadyErrored> {
        let mut guard = self.0.lock().expect("error mutex should be unpoisoned");
        if let Some(original_error) = guard.clone() {
            Err(AlreadyErrored { original_error })
        } else {
            *guard = Some(e);
            Ok(())
        }
    }
pub fn try_update_error ( & self , e : SharedPeerError ) -> Result < ( ) , AlreadyErrored > { let mut guard = self . 0 . lock ( ) . expect ( " " ) ; if let Some ( original_error ) = guard . clone ( ) { Err ( AlreadyErrored { original_error } ) } else { * guard = Some ( e ) ; Ok ( ( ) ) } }
Update the current error in the slot.
Update the current error in the slot .
&self
e
SharedPeerError
correctness
Briefly locks the error slot's threaded `std::sync::Mutex`, to check for
a previous error, then update the error in the slot.
Briefly locks the error slot ' s threaded ` std :: sync :: Mutex ` to check for a previous error then update the error in the slot .