pub struct UnigraphError {
pub display: String,
pub debug: Option<String>,
}Expand description
This is a centralized Error struct for unigraph code that can be used cross-platform. It can be serialized to and from JSON and passed cross php or javascript boundary.
Error (or this crate) also provides a set of formatters that can format it with CLI colors or without, or serialize it to JSON for passing up the stack (e.g. PHP caller)
Fields§
§display: String§debug: Option<String>Implementations§
Source§impl UnigraphError
impl UnigraphError
Trait Implementations§
Source§impl Clone for UnigraphError
impl Clone for UnigraphError
Source§fn clone(&self) -> UnigraphError
fn clone(&self) -> UnigraphError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UnigraphError
impl Debug for UnigraphError
Source§impl<'de> Deserialize<'de> for UnigraphError
impl<'de> Deserialize<'de> for UnigraphError
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 UnigraphError
impl Display for UnigraphError
Source§impl Error for UnigraphError
impl Error for UnigraphError
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()
Source§impl From<Error> for UnigraphError
impl From<Error> for UnigraphError
Auto Trait Implementations§
impl Freeze for UnigraphError
impl RefUnwindSafe for UnigraphError
impl Send for UnigraphError
impl Sync for UnigraphError
impl Unpin for UnigraphError
impl UnsafeUnpin for UnigraphError
impl UnwindSafe for UnigraphError
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