1 2 3 4 5 6 7 8 9 10 11
use crate::errors::kinds::RokError; pub fn wrap_error<E>(error: E, message: impl Into<String>) -> RokError where E: std::error::Error + Send + Sync + 'static, { RokError::Wrapped { message: message.into(), source: Box::new(error), } }