pub struct RenderHandle<M> {
pub tx: Sender<RenderCommand>,
pub _mode: PhantomData<M>,
}Fields§
§tx: Sender<RenderCommand>§_mode: PhantomData<M>Implementations§
Source§impl<M> RenderHandle<M>where
M: RenderModeBehavior,
impl<M> RenderHandle<M>where
M: RenderModeBehavior,
pub fn create_screen( &self, rect: AreaRect, layer: usize, ) -> Result<ScreenKey, AppError>
pub fn change_screen_area( &self, screen_id: ScreenKey, new_area: AreaRect, ) -> Result<(), AppError>
pub fn fit_screen_area_to_contents( &self, screen_id: ScreenKey, ) -> Result<(), AppError>
pub fn add_on_screen_select<F>( &self, screen_id: ScreenKey, callback: F, ) -> Result<(), AppError>
pub fn change_screen_layer( &self, screen_id: ScreenKey, new_layer: usize, ) -> Result<(), AppError>
pub fn register_drawable( &self, screen_id: ScreenKey, obj: DrawObject, ) -> Result<DrawObjectKey, AppError>
pub fn remove_drawable(&self, id: DrawObjectKey) -> Result<(), AppError>
pub fn replace_drawable( &self, id: DrawObjectKey, drawable: Box<dyn Drawable + Send + 'static>, ) -> Result<(), AppError>
pub fn register_sprite_from_source( &self, path: &str, ) -> Result<SpriteId, AppError>
pub fn render_drawable(&self, key: DrawObjectKey) -> Result<(), AppError>
pub fn render_screen(&self, screen_id: ScreenKey) -> Result<(), AppError>
pub fn handle_resize(&self, new_size: (u16, u16)) -> Result<(), AppError>
pub fn get_terminal_size(&self) -> Result<(u16, u16), AppError>
pub fn move_drawable_to( &self, handle: DrawObjectKey, new_pos: Point<i32>, ) -> Result<(), AppError>
pub fn move_drawable_by( &self, handle: DrawObjectKey, dx: i32, dy: i32, ) -> Result<(), AppError>
pub fn move_drawable_point( &self, handle: DrawObjectKey, point_index: usize, new_pos: Point<i32>, ) -> Result<(), AppError>
pub fn get_amount_of_points( &self, handle: DrawObjectKey, ) -> Result<Option<usize>, AppError>
pub fn set_update_interval(&self, amount: usize) -> Result<(), AppError>
pub fn replace_drawable_points( &mut self, handle: DrawObjectKey, new_points: Vec<Point<i32>>, ) -> Result<(), AppError>
pub fn explicit_remove_drawable( &self, id: &DrawObjectKey, ) -> Result<(), AppError>
Source§impl RenderHandle<Buffered>
impl RenderHandle<Buffered>
pub fn render_frame(&self) -> Result<(), AppError>
pub fn into_instant(&self) -> Result<RenderHandle<Instant>, AppError>
Source§impl RenderHandle<Instant>
impl RenderHandle<Instant>
pub fn into_buffered(&self) -> Result<RenderHandle<Buffered>, AppError>
Trait Implementations§
Source§impl<M: Clone> Clone for RenderHandle<M>
impl<M: Clone> Clone for RenderHandle<M>
Source§fn clone(&self) -> RenderHandle<M>
fn clone(&self) -> RenderHandle<M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M> Freeze for RenderHandle<M>
impl<M> RefUnwindSafe for RenderHandle<M>where
M: RefUnwindSafe,
impl<M> Send for RenderHandle<M>where
M: Send,
impl<M> Sync for RenderHandle<M>where
M: Sync,
impl<M> Unpin for RenderHandle<M>where
M: Unpin,
impl<M> UnwindSafe for RenderHandle<M>where
M: UnwindSafe,
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
Mutably borrows from an owned value. Read more