pub enum Event {
Gained,
Lost,
}Expand description
Event type for focus reporting mode (mode 1004).
Variants§
Implementations§
Source§impl Event
impl Event
Sourcepub fn encode(self, buf: &mut [u8]) -> Result<usize>
pub fn encode(self, buf: &mut [u8]) -> Result<usize>
Encode a focus event into a terminal escape sequence.
Encodes a focus gained (CSI I) or focus lost (CSI O) report into the provided buffer.
If the buffer is too small, the method returns
Err(Error::OutOfSpace { required }) where required is the required size.
The caller can then retry with a sufficiently sized buffer.
Trait Implementations§
Source§impl From<Event> for GhosttyFocusEvent
impl From<Event> for GhosttyFocusEvent
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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