pub fn wrap_err<T>(msg: &str, src: T) -> TinkError
where
    T: Error + 'static,
{
    TinkError {
        msg: msg.to_string(),
        src: Some(Box::new(src)),
    }
}
/// Wrap an error with an additional message.  This utility is intended to help
/// with porting Go code to Rust, to cover patterns like:
///
/// ```Go
///   thing, err := FunctionCall()
///   if err != nil {
///     return nil, fmt.Errorf("FunctionCall failed: %s", err)
///   }
/// ```
Wrap an error with an additional message.  This utility is intended to help
with porting Go code to Rust, to cover patterns like.


Wrap an error with an additional message . This utility is intended to help with porting Go code to Rust to cover patterns like .
pub fn wrap_err<T>(msg: &str, src: T) -> TinkError
where
    T: Error + 'static,
{
    TinkError {
        msg: msg.to_string(),
        src: Some(Box::new(src)),
    }
}
pub fn wrap_err < T > ( msg : & str , src : T ) -> TinkError where T : Error + ' static , { TinkError { msg : msg . to_string ( ) , src : Some ( Box :: new ( src ) ) , } }
Wrap an error with an additional message.
Wrap an error with an additional message .
msg
&str
src
T