1use std::string::FromUtf8Error;
2
3#[derive(Debug, thiserror::Error)]
5pub enum CreationError {
6 #[error("Creation of an object failed because Ultralight returned a null pointer")]
9 NullReference,
10 #[error("Failed to convert the string {0} to an ultralight string")]
13 UlStringCreationError(String),
14 #[error("Failed to convert an ultralight string to Rust string")]
17 RustStringCreationError(#[from] FromUtf8Error),
18 #[error("Failed to convert a rust `&str` to a C string")]
20 CStringCreationError(#[from] std::ffi::NulError),
21}