pub struct JsonError {Show 16 fields
pub code: String,
pub detail: String,
pub pos: usize,
pub row: usize,
pub col: usize,
pub src: String,
pub hint: String,
pub tag: String,
pub full_source: String,
pub len: usize,
pub rule: String,
pub rule_stack: Vec<String>,
pub token: ErrorToken,
pub expected: Vec<String>,
pub plugins: Vec<String>,
pub recovered: Option<RecoveredAt>,
/* private fields */
}Expand description
The error a failed parse produces, re-exported so callers need not
depend on the engine crate directly. Mirrors the TypeScript
export { TabnasError as JsonError }.
Fields§
§code: String§detail: String§pos: usize§row: usize§col: usize§src: String§hint: String§tag: String§full_source: String§len: usize§rule: String§rule_stack: Vec<String>§token: ErrorToken§expected: Vec<String>§plugins: Vec<String>§recovered: Option<RecoveredAt>Recovery metadata is intentionally not part of the stable serialized diagnostic schema, matching the canonical implementations.
Implementations§
Source§impl TabnasError
impl TabnasError
Trait Implementations§
Source§impl Clone for TabnasError
impl Clone for TabnasError
Source§fn clone(&self) -> TabnasError
fn clone(&self) -> TabnasError
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 TabnasError
impl Debug for TabnasError
Source§impl Display for TabnasError
impl Display for TabnasError
Source§impl Error for TabnasError
impl Error for TabnasError
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<ActionError> for TabnasError
impl From<ActionError> for TabnasError
Source§fn from(action_error: ActionError) -> TabnasError
fn from(action_error: ActionError) -> TabnasError
Converts to this type from the input type.
Source§impl PartialEq for TabnasError
impl PartialEq for TabnasError
Source§impl Serialize for TabnasError
impl Serialize for TabnasError
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TabnasError
Auto Trait Implementations§
impl !RefUnwindSafe for TabnasError
impl !UnwindSafe for TabnasError
impl Freeze for TabnasError
impl Send for TabnasError
impl Sync for TabnasError
impl Unpin for TabnasError
impl UnsafeUnpin for TabnasError
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