pub enum Error {
OperationCancelled(OperationCancelled),
ThemeColor(ColorError),
RuntimePolicy(RuntimePolicyError),
DetectType(DetectTypeError),
UnsupportedDiagram {
diagram_type: String,
},
DiagramParse {
diagram_type: String,
diagnostic: ParseDiagnostic,
},
MalformedFrontMatter,
InvalidDirectiveJson {
message: String,
},
InvalidFrontMatterYaml {
message: String,
},
}Variants§
OperationCancelled(OperationCancelled)
ThemeColor(ColorError)
RuntimePolicy(RuntimePolicyError)
DetectType(DetectTypeError)
UnsupportedDiagram
DiagramParse
Parser failure for a detected diagram.
This API now carries diagnostic: ParseDiagnostic instead of a top-level message
field. Call diagnostic.message() for the display text and diagnostic.span() /
diagnostic.span_kind() when projecting editor or CLI diagnostics.
MalformedFrontMatter
InvalidDirectiveJson
InvalidFrontMatterYaml
Implementations§
Source§impl Error
impl Error
pub fn diagram_parse_fallback( diagram_type: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn diagram_parse_exact( diagram_type: impl Into<String>, message: impl Into<String>, span: SourceSpan, ) -> Self
pub fn diagram_parse_insertion_point( diagram_type: impl Into<String>, message: impl Into<String>, offset: usize, ) -> Self
pub fn diagram_parse_fallback_at( diagram_type: impl Into<String>, message: impl Into<String>, span: SourceSpan, ) -> Self
pub fn diagram_parse_diagnostic( diagram_type: impl Into<String>, diagnostic: ParseDiagnostic, ) -> Self
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ColorError> for Error
impl From<ColorError> for Error
Source§fn from(source: ColorError) -> Self
fn from(source: ColorError) -> Self
Converts to this type from the input type.
Source§impl From<DetectTypeError> for Error
impl From<DetectTypeError> for Error
Source§fn from(source: DetectTypeError) -> Self
fn from(source: DetectTypeError) -> Self
Converts to this type from the input type.
Source§impl From<OperationCancelled> for Error
impl From<OperationCancelled> for Error
Source§fn from(source: OperationCancelled) -> Self
fn from(source: OperationCancelled) -> Self
Converts to this type from the input type.
Source§impl From<RuntimePolicyError> for Error
impl From<RuntimePolicyError> for Error
Source§fn from(source: RuntimePolicyError) -> Self
fn from(source: RuntimePolicyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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