#[repr(C)]pub struct FigError {
pub size: u32,
pub code: c_int,
pub byte_offset: usize,
pub line: u32,
pub column: u32,
pub message_len: usize,
pub message: [u8; 256],
}Expand description
A caller-allocated parse diagnostic. Mirrors FigError in fig.h. Lead with
size = size_of::<FigError>(): the library writes only the fields size
covers, so it can gain fields in a later release without breaking this layout.
byte_offset/line/column are 0 when unknown. A runtime language’s parse
failure fills byte_offset with the offset its parser reported; the compiled
formats leave all three 0 for now. message is NUL-terminated and truncated
to fit; message_len excludes the NUL.
Fields§
§size: u32§code: c_int§byte_offset: usize§line: u32§column: u32§message_len: usize§message: [u8; 256]Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FigError
impl RefUnwindSafe for FigError
impl Send for FigError
impl Sync for FigError
impl Unpin for FigError
impl UnsafeUnpin for FigError
impl UnwindSafe for FigError
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