pub struct RipsedError {
pub operation_index: Option<usize>,
pub code: ErrorCode,
pub message: String,
pub hint: String,
pub context: HashMap<String, Value>,
}Expand description
A structured error with code, message, hint, and context.
Fields§
§operation_index: Option<usize>§code: ErrorCode§message: String§hint: String§context: HashMap<String, Value>Implementations§
Source§impl RipsedError
impl RipsedError
pub fn no_matches( operation_index: usize, pattern: &str, files_searched: usize, suggestions: Vec<String>, ) -> Self
pub fn invalid_regex(operation_index: usize, pattern: &str, error: &str) -> Self
pub fn invalid_request( message: impl Into<String>, hint: impl Into<String>, ) -> Self
pub fn file_not_found(path: &str, suggestions: Vec<String>) -> Self
pub fn permission_denied(path: &str) -> Self
pub fn binary_file_skipped(path: &str) -> Self
pub fn atomic_rollback(operation_index: usize, file: &str, reason: &str) -> Self
pub fn write_failed(path: &str, os_error: &str) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for RipsedError
impl Clone for RipsedError
Source§fn clone(&self) -> RipsedError
fn clone(&self) -> RipsedError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RipsedError
impl Debug for RipsedError
Source§impl<'de> Deserialize<'de> for RipsedError
impl<'de> Deserialize<'de> for RipsedError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RipsedError
impl Display for RipsedError
Source§impl Error for RipsedError
impl Error for RipsedError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RipsedError
impl RefUnwindSafe for RipsedError
impl Send for RipsedError
impl Sync for RipsedError
impl Unpin for RipsedError
impl UnsafeUnpin for RipsedError
impl UnwindSafe for RipsedError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more