pub trait KittyImage {
// Required methods
fn register(&self) -> Result<usize>;
fn release(&self) -> Result<()>;
fn show<PositionT, SizeT>(
&self,
position: PositionT,
size: Option<SizeT>,
window: Option<Rect>,
) -> Result<()>
where PositionT: Into<Vec2>,
SizeT: Into<Vec2>;
fn hide(&self) -> Result<()>;
}Expand description
Kitty image.
Required Methods§
Sourcefn register(&self) -> Result<usize>
fn register(&self) -> Result<usize>
Register with terminal (if not already registered).
Returns the ID.
Sourcefn show<PositionT, SizeT>(
&self,
position: PositionT,
size: Option<SizeT>,
window: Option<Rect>,
) -> Result<()>
fn show<PositionT, SizeT>( &self, position: PositionT, size: Option<SizeT>, window: Option<Rect>, ) -> Result<()>
Add a placement. Will also remove the existing placement (if there is one).
Position and size are in cell coordinates. If size is set will stretch the image to fit.
If window is set will display only that part of the image. The window dimensions are in pixels.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.