Skip to main content

from_poison_error

Function from_poison_error 

Source
pub fn from_poison_error<T>(
    _error: PoisonError<T>,
    context: &str,
) -> RiLockError
Expand description

Utility function to convert from PoisonError to RiLockError.

This conversion is useful when working with standard library types that return PoisonError and you want to convert to our custom lock error type.

§Arguments

  • error: The poison error to convert
  • context: Description of what was being locked

§Returns

A RiLockError with the appropriate context and poisoned flag