Struct termfest::Termfest

source ·
pub struct Termfest { /* private fields */ }
Expand description

Termfest holds termfest states. It is created by Termfest::hold. When it is dropped, termfest finalizes and restores every terminal states.

Implementations

hold initialize terminal state and termfest state. If succeeded, it returns a tuple of Termfest object and Receiver<Event>. When the returned Termfest object is dropped, the terminal state will be restored.

use termfest::Termfest;
let (fest, events) = Termfest::hold()?;
// do something widht fest and events.

acquire the lock of screen, and returns ScreenLock. It will block if the lock is already acquired.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.