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 for TerminfoResolution
impl PartialEq for TerminfoResolution
Source§impl ToString for TerminfoResolution
impl ToString for TerminfoResolution
Source§impl TryFrom<&str> for TerminfoResolution
impl TryFrom<&str> for TerminfoResolution
Source§impl TryFrom<String> for TerminfoResolution
impl TryFrom<String> for TerminfoResolution
impl Eq for TerminfoResolution
impl StructuralPartialEq for TerminfoResolution
Auto Trait Implementations§
impl Freeze for TerminfoResolution
impl RefUnwindSafe for TerminfoResolution
impl Send for TerminfoResolution
impl Sync for TerminfoResolution
impl Unpin for TerminfoResolution
impl UnwindSafe for TerminfoResolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more