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