#[non_exhaustive]pub enum CustomTripleCreateError {
Unavailable,
DeserializeJson {
triple: String,
input: String,
error: Arc<Error>,
},
}
Expand description
An error returned while creating a custom platform.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
A custom platform was asked to be created, but the custom
feature is currently disabled.
Currently, this can only happen if a custom platform is deserialized from a
PlatformSummary
,
DeserializeJson
custom
only.An error occurred while deserializing serde data.
Implementations§
Source§impl CustomTripleCreateError
impl CustomTripleCreateError
Sourcepub fn input(&self) -> Option<&str>
pub fn input(&self) -> Option<&str>
Returns the provided input that caused the error, if available.
Sourcepub fn input_string(&self) -> Option<&String>
pub fn input_string(&self) -> Option<&String>
A version of Self::input
that returns a &String
rather than a
&str
.
This is a workaround for a miette limitation – &str
can’t be cast to
&dyn SourceCode
, but &String
can.
Sourcepub fn line_and_column(&self) -> Option<(usize, usize)>
pub fn line_and_column(&self) -> Option<(usize, usize)>
Returns the line and column number that caused the error, if available and the error is not an I/O error.
The line and column number are 1-based, though the column number can be 0 if the error occurred between lines.
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Returns a label suitable for the error message to label at
Self::line_and_column
.
This label drops line and column information if available.
Trait Implementations§
Source§impl Clone for CustomTripleCreateError
impl Clone for CustomTripleCreateError
Source§fn clone(&self) -> CustomTripleCreateError
fn clone(&self) -> CustomTripleCreateError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more