utf8proc_sys/
lib.rs

1#![deny(missing_abi)]
2//! Unsafe native bindings to the [utf8proc] library.
3//!
4//! **WARNING**: Right now this crate only supports static linking.
5//!
6//! [utf8proc]: https://juliastrings.github.io/utf8proc/
7
8#[allow(
9// docs are not in rust format
10    rustdoc::bare_urls,
11// names are not in a rust style
12    bad_style,
13// don't do clippy lints for generated files
14    clippy::pedantic,
15    clippy::style,
16    clippy::complexity,
17    clippy::restriction,
18)]
19mod generated;
20pub use generated::*;
21
22/// Memory could not be allocated.
23pub const UTF8PROC_ERROR_NOMEM: utf8proc_ssize_t = -1;
24/// The given string is too long to be processed.
25pub const UTF8PROC_ERROR_OVERFLOW: utf8proc_ssize_t = -2;
26/// The given string is not a legal UTF-8 string.
27pub const UTF8PROC_ERROR_INVALIDUTF8: utf8proc_ssize_t = -3;
28/// The `UTF8PROC_REJECTNA` flag was set and an unassigned codepoint was found. */
29pub const UTF8PROC_ERROR_NOTASSIGNED: utf8proc_ssize_t = -4;
30/// Invalid options have been used.
31pub const UTF8PROC_ERROR_INVALIDOPTS: utf8proc_ssize_t = -5;
32
33impl utf8proc_option_t {
34    /// Indicates no options are set.
35    pub const NONE: utf8proc_option_t = utf8proc_option_t(0);
36}