#[repr(C)]pub struct pm_diagnostic_t {
pub node: pm_list_node_t,
pub location: pm_location_t,
pub diag_id: pm_diagnostic_id_t,
pub message: *const c_char,
pub owned: bool,
pub level: u8,
}
Expand description
This struct represents a diagnostic generated during parsing.
@extends pm_list_node_t
Fields§
§node: pm_list_node_t
The embedded base node.
location: pm_location_t
The location of the diagnostic in the source.
diag_id: pm_diagnostic_id_t
The ID of the diagnostic.
message: *const c_char
The message associated with the diagnostic.
owned: bool
Whether or not the memory related to the message of this diagnostic is owned by this diagnostic. If it is, it needs to be freed when the diagnostic is freed.
level: u8
The level of the diagnostic, see pm_error_level_t
and
pm_warning_level_t
for possible values.
Trait Implementations§
Source§impl Clone for pm_diagnostic_t
impl Clone for pm_diagnostic_t
Source§fn clone(&self) -> pm_diagnostic_t
fn clone(&self) -> pm_diagnostic_t
Returns a copy 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 pm_diagnostic_t
impl Debug for pm_diagnostic_t
Source§impl Default for pm_diagnostic_t
impl Default for pm_diagnostic_t
impl Copy for pm_diagnostic_t
Auto Trait Implementations§
impl Freeze for pm_diagnostic_t
impl RefUnwindSafe for pm_diagnostic_t
impl !Send for pm_diagnostic_t
impl !Sync for pm_diagnostic_t
impl Unpin for pm_diagnostic_t
impl UnwindSafe for pm_diagnostic_t
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