[−][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.
Implementations
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 Scrollable for Terminal
[src]
pub fn scroll_forwards(&mut self) -> OperationResult
[src]
pub fn scroll_backwards(&mut self) -> OperationResult
[src]
pub fn scroll_to_beginning(&mut self) -> OperationResult
[src]
pub fn scroll_to_end(&mut self) -> OperationResult
[src]
impl Widget for Terminal
[src]
pub fn space_demand(&self) -> Demand2D
[src]
pub fn draw(&self, window: Window<'_>, hints: RenderingHints)
[src]
impl Writable for Terminal
[src]
pub fn write(&mut self, c: char) -> OperationResult
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Terminal
impl Send for Terminal
impl !Sync for Terminal
impl Unpin for Terminal
impl UnwindSafe for Terminal
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,