ts-rs 12.0.1

generate typescript bindings from rust types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// An error which may occur when exporting a type
#[derive(thiserror::Error, Debug)]
pub enum ExportError {
    #[error("this type cannot be exported")]
    CannotBeExported(&'static str),
    #[cfg(feature = "format")]
    #[error("an error occurred while formatting the generated typescript output")]
    Formatting(String),
    #[error("an error occurred while performing IO")]
    Io(#[from] std::io::Error),
    #[error("the environment variable CARGO_MANIFEST_DIR is not set")]
    ManifestDirNotSet,
    #[error("an error occurred while writing to a formatted buffer")]
    Fmt(#[from] std::fmt::Error),
    #[error(r#"TS_RS_IMPORT_EXTENSION must be either "js" or "ts""#)]
    InvalidImportExtension,
}