Skip to main content

LifecycleEvent

Enum LifecycleEvent 

Source
pub enum LifecycleEvent {
Show 25 variants ClientAttached { session_name: SessionName, client_name: Option<String>, }, ClientDetached { session_name: SessionName, client_name: Option<String>, }, ClientSessionChanged { session_name: SessionName, client_name: Option<String>, }, SessionCreated { session_name: SessionName, }, SessionClosed { session_name: SessionName, session_id: Option<u32>, }, SessionRenamed { session_name: SessionName, }, SessionWindowChanged { session_name: SessionName, }, WindowLinked { session_name: SessionName, target: Option<WindowTarget>, }, WindowUnlinked { session_name: SessionName, target: Option<WindowTarget>, window_id: Option<u32>, window_name: Option<String>, }, WindowRenamed { target: WindowTarget, }, WindowLayoutChanged { target: WindowTarget, }, WindowResized { target: WindowTarget, }, WindowPaneChanged { target: WindowTarget, }, AlertBell { target: WindowTarget, }, AlertActivity { target: WindowTarget, }, AlertSilence { target: WindowTarget, }, PaneExited { target: PaneTarget, pane_id: Option<u32>, window_id: Option<u32>, window_name: Option<String>, }, PaneDied { target: PaneTarget, pane_id: Option<u32>, window_id: Option<u32>, window_name: Option<String>, }, PaneModeChanged { target: PaneTarget, }, PasteBufferChanged { buffer_name: String, }, PasteBufferDeleted { buffer_name: String, }, AfterSelectWindow { target: WindowTarget, }, AfterSelectPane { target: PaneTarget, }, AfterSendKeys { target: PaneTarget, }, AfterSetOption { session_name: Option<SessionName>, },
}
Expand description

A typed server lifecycle event that may dispatch a registered hook.

Variants§

§

ClientAttached

A client attached to a session.

Fields

§session_name: SessionName

The session associated with the event.

§client_name: Option<String>

The best available rmux client identifier.

§

ClientDetached

A client detached from a session.

Fields

§session_name: SessionName

The session associated with the event.

§client_name: Option<String>

The best available rmux client identifier.

§

ClientSessionChanged

A client switched to another session.

Fields

§session_name: SessionName

The session associated with the event.

§client_name: Option<String>

The best available rmux client identifier.

§

SessionCreated

A session was created.

Fields

§session_name: SessionName

The session associated with the event.

§

SessionClosed

A session was closed.

Fields

§session_name: SessionName

The session associated with the event.

§session_id: Option<u32>

The removed session ID captured at notification time, when known.

§

SessionRenamed

A session was renamed.

Fields

§session_name: SessionName

The session associated with the event.

§

SessionWindowChanged

A session’s active window changed.

Fields

§session_name: SessionName

The session associated with the event.

§

WindowLinked

A window was linked into a session.

Fields

§session_name: SessionName

The session associated with the event.

§target: Option<WindowTarget>

The linked window, when it is known at the call site.

§

WindowUnlinked

A window was unlinked from a session.

Fields

§session_name: SessionName

The session associated with the event.

§target: Option<WindowTarget>

The unlinked window, when it is known at the call site.

§window_id: Option<u32>

The removed window ID captured at notification time, when known.

§window_name: Option<String>

The removed window name captured at notification time, when known.

§

WindowRenamed

A window was renamed.

Fields

§target: WindowTarget

The targeted window.

§

WindowLayoutChanged

A window layout changed.

Fields

§target: WindowTarget

The targeted window.

§

WindowResized

A window size changed.

Fields

§target: WindowTarget

The targeted window.

§

WindowPaneChanged

A window’s active pane changed.

Fields

§target: WindowTarget

The targeted window.

§

AlertBell

A bell alert fired for a window.

Fields

§target: WindowTarget

The targeted window.

§

AlertActivity

An activity alert fired for a window.

Fields

§target: WindowTarget

The targeted window.

§

AlertSilence

A silence alert fired for a window.

Fields

§target: WindowTarget

The targeted window.

§

PaneExited

A pane exited or was removed from service.

Fields

§target: PaneTarget

The targeted pane.

§pane_id: Option<u32>

The removed pane ID captured at notification time, when known.

§window_id: Option<u32>

The removed window ID captured at notification time, when known.

§window_name: Option<String>

The removed window name captured at notification time, when known.

§

PaneDied

A pane died and was kept by remain-on-exit.

Fields

§target: PaneTarget

The targeted pane.

§pane_id: Option<u32>

The dead pane ID captured at notification time, when known.

§window_id: Option<u32>

The dead pane’s window ID captured at notification time, when known.

§window_name: Option<String>

The dead pane’s window name captured at notification time, when known.

§

PaneModeChanged

A pane mode or display overlay state changed.

Fields

§target: PaneTarget

The targeted pane.

§

PasteBufferChanged

A paste buffer was created or replaced.

Fields

§buffer_name: String

The affected paste buffer name.

§

PasteBufferDeleted

A paste buffer was deleted or evicted.

Fields

§buffer_name: String

The affected paste buffer name.

§

AfterSelectWindow

A select-window-family command completed successfully.

Fields

§target: WindowTarget

The selected window.

§

AfterSelectPane

A select-pane-family command completed successfully.

Fields

§target: PaneTarget

The selected pane.

§

AfterSendKeys

A send-keys command completed successfully.

Fields

§target: PaneTarget

The targeted pane.

§

AfterSetOption

A set-option command completed successfully.

Fields

§session_name: Option<SessionName>

The session associated with the option scope, when one exists.

Implementations§

Source§

impl LifecycleEvent

Source

pub const fn hook_name(&self) -> HookName

Returns the hook name corresponding to this lifecycle event.

Source

pub fn scope(&self) -> ScopeSelector

Returns the event scope used for hook resolution.

Source

pub fn session_name(&self) -> Option<&SessionName>

Returns the session associated with this lifecycle event, when one exists.

Source

pub fn client_name(&self) -> Option<&str>

Returns the event client identifier when one is available.

Source

pub fn window_target(&self) -> Option<WindowTarget>

Returns the event window target when one is available.

Source

pub fn pane_target(&self) -> Option<&PaneTarget>

Returns the event pane target when one is available.

Source

pub const fn session_id(&self) -> Option<u32>

Returns the event session ID captured at notification time, when one exists.

Source

pub const fn window_id(&self) -> Option<u32>

Returns the event window ID captured at notification time, when one exists.

Source

pub fn window_name_snapshot(&self) -> Option<&str>

Returns the event window name captured at notification time, when one exists.

Source

pub const fn pane_id(&self) -> Option<u32>

Returns the event pane ID captured at notification time, when one exists.

Source

pub fn buffer_name(&self) -> Option<&str>

Returns the paste buffer name when one is available.

Source

pub fn current_target(&self) -> Option<Target>

Returns the best available current target for hook execution.

Trait Implementations§

Source§

impl Clone for LifecycleEvent

Source§

fn clone(&self) -> LifecycleEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LifecycleEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for LifecycleEvent

Source§

impl PartialEq for LifecycleEvent

Source§

fn eq(&self, other: &LifecycleEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for LifecycleEvent

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

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.