pub struct FormatContext { /* private fields */ }Expand description
Format values populated from session, window, pane, and server-side context.
Implementations§
Source§impl FormatContext
impl FormatContext
Sourcepub fn from_session(session: &Session) -> Self
pub fn from_session(session: &Session) -> Self
Creates a format context populated from a session.
Sourcepub fn with_session(self, session: &Session) -> Self
pub fn with_session(self, session: &Session) -> Self
Populates session-level variables from a session.
Sourcepub const fn with_session_attached(self, attached_count: usize) -> Self
pub const fn with_session_attached(self, attached_count: usize) -> Self
Populates the externally tracked attached-client count.
Sourcepub fn with_window(
self,
window_index: u32,
window: &Window,
active: bool,
last: bool,
) -> Self
pub fn with_window( self, window_index: u32, window: &Window, active: bool, last: bool, ) -> Self
Populates window-level variables from a window and its session-local state.
Sourcepub fn with_pane(self, pane: &Pane, active: bool) -> Self
pub fn with_pane(self, pane: &Pane, active: bool) -> Self
Populates pane-level variables from a pane and its window-local state.
Sourcepub fn with_window_pane(self, window: &Window, pane: &Pane) -> Self
pub fn with_window_pane(self, window: &Window, pane: &Pane) -> Self
Populates pane-level variables, deriving active state from the owning window.
Trait Implementations§
Source§impl Clone for FormatContext
impl Clone for FormatContext
Source§fn clone(&self) -> FormatContext
fn clone(&self) -> FormatContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatContext
impl Debug for FormatContext
Source§impl Default for FormatContext
impl Default for FormatContext
Source§fn default() -> FormatContext
fn default() -> FormatContext
Returns the “default value” for a type. Read more
impl Eq for FormatContext
Source§impl FormatVariables for FormatContext
impl FormatVariables for FormatContext
Source§fn format_value(&self, variable: FormatVariable) -> Option<String>
fn format_value(&self, variable: FormatVariable) -> Option<String>
Resolves a supported format variable to its rendered value.
Source§fn format_value_by_name(&self, name: &str) -> Option<String>
fn format_value_by_name(&self, name: &str) -> Option<String>
Resolves an arbitrary string-keyed variable name. Read more
Source§fn format_name_exists(&self, _scope: Option<char>, _name: &str) -> Option<bool>
fn format_name_exists(&self, _scope: Option<char>, _name: &str) -> Option<bool>
Checks whether a window or session name exists for the
N: modifier. Read moreSource§impl PartialEq for FormatContext
impl PartialEq for FormatContext
impl StructuralPartialEq for FormatContext
Auto Trait Implementations§
impl Freeze for FormatContext
impl RefUnwindSafe for FormatContext
impl Send for FormatContext
impl Sync for FormatContext
impl Unpin for FormatContext
impl UnsafeUnpin for FormatContext
impl UnwindSafe for FormatContext
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