pub enum Graphics {
Kitty,
Sixel,
HalfBlock,
None,
}Expand description
The way a picture can be drawn in this terminal, sharpest first.
Variants§
Kitty
The kitty graphics protocol: real pixels, sent once and placed again by number. Kitty, WezTerm, Ghostty and Konsole answer to it.
Sixel
DEC sixel: real pixels, written out whole each time. foot, WezTerm, mlterm, Windows Terminal and a configured xterm answer to it.
HalfBlock
Half blocks: each cell shows two pixels, the upper one as the colour of ▀, the lower one
as the cell’s ground. Every terminal with 256 or more colours shows it, over any link.
None
No picture at all: the terminal has 16 colours or draws in ASCII, where a picture cannot be told apart from noise. A picture’s place shows what it is instead.
Implementations§
Source§impl Graphics
impl Graphics
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
The name the QUVYTA_GRAPHICS environment variable takes for this value: kitty,
sixel, halfblock or none.
Sourcepub fn can_draw(self) -> bool
pub fn can_draw(self) -> bool
Whether a picture is drawn at all: true for everything but Graphics::None.
It is the question the Image widget asks itself before it draws, so an
application that would rather show nothing than the image’s “cannot show” state, such as
a wallpaper, asks it first and gets the same answer. Read it from
Env::graphics in view, or from
App::graphics before decoding.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
The value name stands for, as Graphics::name writes it; case and surrounding space
do not matter. None for any other name.
Trait Implementations§
impl Copy for Graphics
impl Eq for Graphics
impl StructuralPartialEq for Graphics
Auto Trait Implementations§
impl Freeze for Graphics
impl RefUnwindSafe for Graphics
impl Send for Graphics
impl Sync for Graphics
impl Unpin for Graphics
impl UnsafeUnpin for Graphics
impl UnwindSafe for Graphics
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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