pub struct ParserWarning {
pub message: String,
pub position: Option<SourcePosition>,
pub category: ErrorCategory,
}Expand description
Parser warning type
Fields§
§message: StringWarning message
position: Option<SourcePosition>Position in source (if available)
category: ErrorCategoryWarning category
Implementations§
Source§impl ParserWarning
impl ParserWarning
Sourcepub fn new(message: String, category: ErrorCategory) -> Self
pub fn new(message: String, category: ErrorCategory) -> Self
Create a new warning
Sourcepub fn with_position(
message: String,
category: ErrorCategory,
position: SourcePosition,
) -> Self
pub fn with_position( message: String, category: ErrorCategory, position: SourcePosition, ) -> Self
Create a warning with position
Trait Implementations§
Source§impl Clone for ParserWarning
impl Clone for ParserWarning
Source§fn clone(&self) -> ParserWarning
fn clone(&self) -> ParserWarning
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 ParserWarning
impl Debug for ParserWarning
Source§impl<'de> Deserialize<'de> for ParserWarning
impl<'de> Deserialize<'de> for ParserWarning
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 PartialEq for ParserWarning
impl PartialEq for ParserWarning
Source§fn eq(&self, other: &ParserWarning) -> bool
fn eq(&self, other: &ParserWarning) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParserWarning
impl Serialize for ParserWarning
impl StructuralPartialEq for ParserWarning
Auto Trait Implementations§
impl Freeze for ParserWarning
impl RefUnwindSafe for ParserWarning
impl Send for ParserWarning
impl Sync for ParserWarning
impl Unpin for ParserWarning
impl UnsafeUnpin for ParserWarning
impl UnwindSafe for ParserWarning
Blanket Implementations§
impl<T> Allocation for T
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