Skip to main content

TerminalCallbacks

Struct TerminalCallbacks 

Source
pub struct TerminalCallbacks { /* private fields */ }
Expand description

A standard vt100 callback implementation that writes responses back to a provided PTY file descriptor (such as Device Attributes and Device Status Report).

Implementations§

Source§

impl TerminalCallbacks

Source

pub fn new(pty_fd: Option<File>) -> Self

Source

pub fn new_with_shared(pty_fd: Arc<Mutex<Option<File>>>) -> Self

Trait Implementations§

Source§

impl Callbacks for TerminalCallbacks

Source§

fn unhandled_csi( &mut self, screen: &mut Screen, i1: Option<u8>, _i2: Option<u8>, params: &[&[u16]], c: char, )

This callback is called when the terminal receives a CSI sequence (\e[) which is otherwise not implemented.
Source§

fn audible_bell(&mut self, _: &mut Screen)

This callback is called when the terminal requests an audible bell (typically with ^G).
Source§

fn visual_bell(&mut self, _: &mut Screen)

This callback is called when the terminal requests a visual bell (typically with \eg).
Source§

fn resize(&mut self, _: &mut Screen, _request: (u16, u16))

This callback is called when the terminal requests a resize (typically with \e[8;<rows>;<cols>t).
Source§

fn set_window_icon_name(&mut self, _: &mut Screen, _icon_name: &[u8])

This callback is called when the terminal requests the window title to be set (typically with \e]1;<icon_name>\a)
Source§

fn set_window_title(&mut self, _: &mut Screen, _title: &[u8])

This callback is called when the terminal requests the window title to be set (typically with \e]2;<title>\a)
Source§

fn copy_to_clipboard(&mut self, _: &mut Screen, _ty: &[u8], _data: &[u8])

This callback is called when the terminal requests data to be copied to the system clipboard (typically with \e]52;<ty>;<data>\a). Note that data will be encoded as base64.
Source§

fn paste_from_clipboard(&mut self, _: &mut Screen, _ty: &[u8])

This callback is called when the terminal requests data to be pasted from the system clipboard (typically with \e]52;<ty>;?\a).
Source§

fn unhandled_char(&mut self, _: &mut Screen, _c: char)

This callback is called when the terminal receives an escape sequence which is otherwise not implemented.
Source§

fn unhandled_control(&mut self, _: &mut Screen, _b: u8)

This callback is called when the terminal receives a control character which is otherwise not implemented.
Source§

fn unhandled_escape( &mut self, _: &mut Screen, _i1: Option<u8>, _i2: Option<u8>, _b: u8, )

This callback is called when the terminal receives an escape sequence which is otherwise not implemented.
Source§

fn unhandled_osc(&mut self, _: &mut Screen, _params: &[&[u8]])

This callback is called when the terminal receives a OSC sequence (\e]) which is otherwise not implemented.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> InstanceFromServiceTransport<T> for T

§

fn from_service_transport(handle: T) -> T

Converts the given service transport handle of type T to [Self]
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Cast the given object into a dyn std::any::Any.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<St> WithTag for St

§

fn tagged<T>(self, tag: T) -> Tagged<T, St>

Produce a new stream from this one which yields item tupled with a constant tag
§

impl<E> RunsTransport<Mpsc> for E

§

impl<E> RunsTransport<Mpsc> for E
where E: RunsTransport<Mpsc>,