pub struct ScreenManager<'sm> { /* private fields */ }Expand description
ScreenManager is responsible for redirecting the user to the screen it should be seeing at any point by the application, it is the entity behind navigation
Implementations§
Source§impl<'sm> ScreenManager<'sm>
impl<'sm> ScreenManager<'sm>
Trait Implementations§
Source§impl Eventful for ScreenManager<'_>
impl Eventful for ScreenManager<'_>
Source§impl Renderable for ScreenManager<'_>
impl Renderable for ScreenManager<'_>
fn draw(&mut self, frame: &mut Frame<'_>, size: Rect) -> Result<()>
Source§fn register_command_handler(
&mut self,
sender: UnboundedSender<Command>,
) -> Result<()>
fn register_command_handler( &mut self, sender: UnboundedSender<Command>, ) -> Result<()>
register a page to be a command handler, which means this page will now receive
commands from the channel to handle whatever the commands it is interested into
Source§fn resize(&mut self, new_size: Rect)
fn resize(&mut self, new_size: Rect)
pages need to adapt to change of sizes on the application, this function is called
by the top level event loop whenever a resize event is produced
Source§fn handle_tick(&mut self) -> Result<()>
fn handle_tick(&mut self) -> Result<()>
tick is a bigger interval than the one used by the render cycle, it is mainly used
for actions that rely on time, such as syncing changes to disk
Auto Trait Implementations§
impl<'sm> !RefUnwindSafe for ScreenManager<'sm>
impl<'sm> !Send for ScreenManager<'sm>
impl<'sm> !Sync for ScreenManager<'sm>
impl<'sm> !UnwindSafe for ScreenManager<'sm>
impl<'sm> Freeze for ScreenManager<'sm>
impl<'sm> Unpin for ScreenManager<'sm>
impl<'sm> UnsafeUnpin for ScreenManager<'sm>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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