pub enum SwitchbackError {
Codec(String),
Render(String),
Load(String),
Link(String),
Companion(String),
Io {
path: PathBuf,
source: Error,
},
Other(String),
}Expand description
Error type for seam operations (codec, render, load, link extraction).
Variants§
Codec(String)
Binary codec serialize/deserialize failed.
Render(String)
Renderer failed to produce output.
Load(String)
Contract or manual loading failed.
Link(String)
Link extraction or formatting failed.
Companion(String)
Companion discovery failed.
Io
Local filesystem I/O.
Fields
Other(String)
Catch-all for family-specific failures without pulling in anyhow.
Implementations§
Source§impl SwitchbackError
impl SwitchbackError
Sourcepub fn load(message: impl Into<String>) -> Self
pub fn load(message: impl Into<String>) -> Self
Wraps a contract or manual load failure message.
Sourcepub fn link(message: impl Into<String>) -> Self
pub fn link(message: impl Into<String>) -> Self
Wraps a link extraction or formatting failure message.
Trait Implementations§
Source§impl Debug for SwitchbackError
impl Debug for SwitchbackError
Source§impl Display for SwitchbackError
impl Display for SwitchbackError
Source§impl Error for SwitchbackError
impl Error for SwitchbackError
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 !RefUnwindSafe for SwitchbackError
impl !UnwindSafe for SwitchbackError
impl Freeze for SwitchbackError
impl Send for SwitchbackError
impl Sync for SwitchbackError
impl Unpin for SwitchbackError
impl UnsafeUnpin for SwitchbackError
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