pub struct Error { /* private fields */ }
Expand description
A parse error.
This is a wrapper type for a Pest Error
to make it
easier to work with and report within Sprocket.
Implementations§
Source§impl Error
impl Error
Sourcepub fn new(message: impl Into<String>, location: Location) -> Self
pub fn new(message: impl Into<String>, location: Location) -> Self
Creates a new parse Error
.
Note: almost always, you should prefer converting from a Pest
error to an Error
using Error::from()
.
Don’t use this function unless you know what you are doing!
§Examples
use wdl_core::concern::parse;
use wdl_core::file::Location;
let error = parse::Error::new("Hello, world!", Location::Unplaced);
Sourcepub fn into_message(self) -> String
pub fn into_message(self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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 Ord for Error
impl Ord for Error
Source§impl PartialOrd for Error
impl PartialOrd for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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