pub enum CsharpError {
Io(String),
CompilationFailed(String),
RuntimeFailed(String),
InvalidUtf8(FromUtf8Error),
InvalidChar,
}Expand description
Re-export the core error type and runtime helpers.
All errors that csharp! and csharp_fn! can return at runtime (and that
ct_csharp! maps to compile_error! diagnostics at build time).
Variants§
Io(String)
An I/O error while creating the temp directory, writing the source
file, or spawning dotnet (e.g. the binary is not on PATH).
CompilationFailed(String)
dotnet build exited with a non-zero status. The 0 field contains
the compiler diagnostic output (stderr).
RuntimeFailed(String)
The dotnet runtime exited with a non-zero status (e.g. an unhandled
exception). The 0 field contains the exception message and stack
trace (stderr).
InvalidUtf8(FromUtf8Error)
The C# program returned bytes that are not valid UTF-8.
InvalidChar
The C# program returned a char value that is not a valid Unicode
scalar (i.e. a lone surrogate half).
Trait Implementations§
Source§impl Clone for CsharpError
impl Clone for CsharpError
Source§fn clone(&self) -> CsharpError
fn clone(&self) -> CsharpError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CsharpError
impl Debug for CsharpError
Source§impl Display for CsharpError
impl Display for CsharpError
Source§impl Error for CsharpError
impl Error for CsharpError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()