[−][src]Struct unsegen_terminal::Terminal
unsegen Widget
that models a pseudoterminal and displays its contents to the window when
drawn.
Use ScrollBehavior
to scroll in the (potentially infinite buffer) and WriteBehavior
to
pass specific keystrokes to the terminal.
Methods
impl Terminal
[src]
pub fn new<S: SlaveInputSink + 'static>(input_sink: S) -> Result<Self>
[src]
Create a Terminal which will use the provided SlaveInputSink
to notify the user of new
input from the pty.
This method will create a posix pty. The associated file (path) can be obtained using
get_slave_name
.
pub fn add_byte_input(&mut self, bytes: &[u8])
[src]
Add raw byte input to the terminal window. Call this for bytes that you received (indirectly) from SlaveInputSink::receive_bytes_from_pty.
pub fn slave_name(&self) -> &OsStr
[src]
Get the name of the slave pseudoterminal that is associated with the Terminal
.
(c.f. posix ptsname
)
Trait Implementations
impl<P: ?Sized> Container<P> for Terminal
[src]
Default container behavior:
Scroll using PageUp
/PageDown
, jump to beginning/end using Home
/End
and pass all other
input to the slave terminal.
impl Widget for Terminal
[src]
fn space_demand(&self) -> Demand2D
[src]
fn draw(&self, window: Window, hints: RenderingHints)
[src]
impl Scrollable for Terminal
[src]
fn scroll_forwards(&mut self) -> OperationResult
[src]
fn scroll_backwards(&mut self) -> OperationResult
[src]
fn scroll_to_beginning(&mut self) -> OperationResult
[src]
fn scroll_to_end(&mut self) -> OperationResult
[src]
impl Writable for Terminal
[src]
fn write(&mut self, c: char) -> OperationResult
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,