Function other_err

Source
pub fn other_err<T: OtherErr>(
    context: &'static str,
    description: &'static str,
) -> T
Expand description

Helper function to create a generic “other” error.

This function is a convenience wrapper around the OtherErr trait.

§Arguments

  • context - The context in which the error occurred.
  • description - A description of the error.

§Returns

A new error instance of type T that implements OtherErr.