pub struct ParseError {
pub message: String,
pub labels: Vec<(Span, String)>,
pub help: Option<String>,
pub note: Option<String>,
pub code: String,
}Fields§
§message: String§labels: Vec<(Span, String)>§help: Option<String>§note: Option<String>§code: StringImplementations§
Source§impl ParseError
impl ParseError
pub fn new( message: impl Into<String>, span: Span, label: impl Into<String>, ) -> Self
pub fn with_span_label(self, span: Span, label: impl Into<String>) -> Self
pub fn with_help(self, help: impl Into<String>) -> Self
pub fn with_note(self, note: impl Into<String>) -> Self
pub fn with_lex_code(self, code: &str) -> Self
pub fn with_parse_code(self, code: &str) -> Self
pub fn with_lint_code(self, code: &str) -> Self
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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