pub enum LifecycleEvent {
Show 23 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,
},
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>,
},
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: SessionNameThe session associated with the event.
ClientDetached
A client detached from a session.
Fields
session_name: SessionNameThe session associated with the event.
ClientSessionChanged
A client switched to another session.
Fields
session_name: SessionNameThe session associated with the event.
SessionCreated
A session was created.
Fields
session_name: SessionNameThe session associated with the event.
SessionClosed
A session was closed.
Fields
session_name: SessionNameThe session associated with the event.
SessionRenamed
A session was renamed.
Fields
session_name: SessionNameThe session associated with the event.
SessionWindowChanged
A session’s active window changed.
Fields
session_name: SessionNameThe session associated with the event.
WindowLinked
A window was linked into a session.
Fields
session_name: SessionNameThe 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: SessionNameThe session associated with the event.
target: Option<WindowTarget>The unlinked window, when it is known at the call site.
WindowRenamed
A window was renamed.
Fields
target: WindowTargetThe targeted window.
WindowLayoutChanged
A window layout changed.
Fields
target: WindowTargetThe targeted window.
WindowPaneChanged
A window’s active pane changed.
Fields
target: WindowTargetThe targeted window.
AlertBell
A bell alert fired for a window.
Fields
target: WindowTargetThe targeted window.
AlertActivity
An activity alert fired for a window.
Fields
target: WindowTargetThe targeted window.
AlertSilence
A silence alert fired for a window.
Fields
target: WindowTargetThe targeted window.
PaneExited
A pane exited or was removed from service.
Fields
target: PaneTargetThe targeted pane.
PaneModeChanged
A pane mode or display overlay state changed.
Fields
target: PaneTargetThe targeted pane.
PasteBufferChanged
A paste buffer was created or replaced.
PasteBufferDeleted
A paste buffer was deleted or evicted.
AfterSelectWindow
A select-window-family command completed successfully.
Fields
target: WindowTargetThe selected window.
AfterSelectPane
A select-pane-family command completed successfully.
Fields
target: PaneTargetThe selected pane.
AfterSendKeys
A send-keys command completed successfully.
Fields
target: PaneTargetThe 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
impl LifecycleEvent
Sourcepub const fn hook_name(&self) -> HookName
pub const fn hook_name(&self) -> HookName
Returns the hook name corresponding to this lifecycle event.
Sourcepub fn scope(&self) -> ScopeSelector
pub fn scope(&self) -> ScopeSelector
Returns the event scope used for hook resolution.
Sourcepub fn session_name(&self) -> Option<&SessionName>
pub fn session_name(&self) -> Option<&SessionName>
Returns the session associated with this lifecycle event, when one exists.
Sourcepub fn client_name(&self) -> Option<&str>
pub fn client_name(&self) -> Option<&str>
Returns the event client identifier when one is available.
Sourcepub fn window_target(&self) -> Option<WindowTarget>
pub fn window_target(&self) -> Option<WindowTarget>
Returns the event window target when one is available.
Sourcepub fn pane_target(&self) -> Option<&PaneTarget>
pub fn pane_target(&self) -> Option<&PaneTarget>
Returns the event pane target when one is available.
Sourcepub const fn session_id(&self) -> Option<u32>
pub const fn session_id(&self) -> Option<u32>
Returns the event session ID captured at notification time, when one exists.
Sourcepub const fn window_id(&self) -> Option<u32>
pub const fn window_id(&self) -> Option<u32>
Returns the event window ID captured at notification time, when one exists.
Sourcepub fn window_name_snapshot(&self) -> Option<&str>
pub fn window_name_snapshot(&self) -> Option<&str>
Returns the event window name captured at notification time, when one exists.
Sourcepub const fn pane_id(&self) -> Option<u32>
pub const fn pane_id(&self) -> Option<u32>
Returns the event pane ID captured at notification time, when one exists.
Sourcepub fn buffer_name(&self) -> Option<&str>
pub fn buffer_name(&self) -> Option<&str>
Returns the paste buffer name when one is available.
Sourcepub fn current_target(&self) -> Option<Target>
pub fn current_target(&self) -> Option<Target>
Returns the best available current target for hook execution.
Trait Implementations§
Source§impl Clone for LifecycleEvent
impl Clone for LifecycleEvent
Source§fn clone(&self) -> LifecycleEvent
fn clone(&self) -> LifecycleEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleEvent
impl Debug for LifecycleEvent
Source§impl PartialEq for LifecycleEvent
impl PartialEq for LifecycleEvent
Source§fn eq(&self, other: &LifecycleEvent) -> bool
fn eq(&self, other: &LifecycleEvent) -> bool
self and other values to be equal, and is used by ==.