Enum pyembed::TerminfoResolution
source · pub enum TerminfoResolution {
Dynamic,
None,
Static(String),
}
Expand description
Defines terminfo
database resolution semantics.
Python links against libraries like readline
, libedit
, and ncurses
which need to utilize a terminfo
database (a set of files defining
terminals and their capabilities) in order to work properly.
The absolute path to the terminfo database is typically compiled into these libraries at build time. If the compiled path on the building machine doesn’t match the path on the runtime machine, these libraries cannot find the terminfo database and terminal interactions won’t work correctly because these libraries don’t know how to resolve terminal features. This can result in quirks like the backspace key not working in prompts.
The pyembed
Rust crate is able to point libraries at a terminfo database
at runtime, overriding the compiled-in default path. This enum is used
to control that behavior.
Serialization type: string
.
Variants§
Dynamic
Resolve terminfo
database using appropriate behavior for current OS.
We will look for the terminfo database in paths that are common for the current OS / distribution. The terminfo database is present in most systems (except the most barebones containers or sandboxes) and this method is usually successfully in locating the terminfo database.
Serialized value: dynamic
None
Do not attempt to resolve the terminfo
database. Basically a no-op.
This is what should be used for applications that don’t interact with the
terminal. Using this option will prevent some I/O syscalls that would
be incurred by dynamic
.
Serialized value: none
Static(String)
Use a specified string as the TERMINFO_DIRS
value.
Serialized value: static:<path>
e.g. static:/usr/share/terminfo
.
Trait Implementations§
source§impl Clone for TerminfoResolution
impl Clone for TerminfoResolution
source§fn clone(&self) -> TerminfoResolution
fn clone(&self) -> TerminfoResolution
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TerminfoResolution
impl Debug for TerminfoResolution
source§impl PartialEq<TerminfoResolution> for TerminfoResolution
impl PartialEq<TerminfoResolution> for TerminfoResolution
source§fn eq(&self, other: &TerminfoResolution) -> bool
fn eq(&self, other: &TerminfoResolution) -> bool
self
and other
values to be equal, and is used
by ==
.