1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Safe Rust bindings to the [libedit](https://www.thrysoee.dk/editline/)
//! line-editing library.
//!
//! This crate provides ergonomic, safe wrappers around the raw FFI bindings
//! in [`libedit_sys`]. It handles memory management, provides Rust-idiomatic
//! types and error handling, and deals with libedit's C variadic functions
//! properly.
//!
//! # Example
//!
//! ```no_run
//! use libedit::EditLine;
//!
//! let mut el = EditLine::new("example").unwrap();
//! if let Some(line) = el.readline("prompt> ").unwrap() {
//! println!("got: {line}");
//! }
//! ```
//!
//! # Error handling
//!
//! All fallible operations return [`Result<T>`], which aliases
//! `std::result::Result<T, `[`Error`]`>`. A single [`Error`] type is shared
//! across the editor, history, and tokenizer so that a `?` works uniformly
//! throughout an application.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Tokenizer;
/// Re-exported libedit `EL_*` / `H_*` operation constants for use with the
/// escape-hatch methods [`EditLine::set_int`] and [`EditLine::get_int`].
///
/// Prefer the typed helper methods where available; these constants are
/// provided so callers do not need to depend on `libedit-sys` directly.