pub struct SessionBuilder { /* private fields */ }Expand description
Builder for creating session configurations.
Implementations§
Source§impl SessionBuilder
impl SessionBuilder
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Set a single environment variable.
Sourcepub fn working_directory(self, path: impl Into<PathBuf>) -> Self
pub fn working_directory(self, path: impl Into<PathBuf>) -> Self
Set the working directory.
Sourcepub const fn dimensions(self, cols: u16, rows: u16) -> Self
pub const fn dimensions(self, cols: u16, rows: u16) -> Self
Set the terminal dimensions (width, height).
Sourcepub const fn timeout_config(self, config: TimeoutConfig) -> Self
pub const fn timeout_config(self, config: TimeoutConfig) -> Self
Set the timeout configuration.
Sourcepub const fn buffer_max_size(self, max_size: usize) -> Self
pub const fn buffer_max_size(self, max_size: usize) -> Self
Set the buffer max size.
Sourcepub const fn buffer_config(self, config: BufferConfig) -> Self
pub const fn buffer_config(self, config: BufferConfig) -> Self
Set the buffer configuration.
Sourcepub const fn line_ending(self, line_ending: LineEnding) -> Self
pub const fn line_ending(self, line_ending: LineEnding) -> Self
Set the line ending style.
Sourcepub const fn unix_line_endings(self) -> Self
pub const fn unix_line_endings(self) -> Self
Use Unix line endings (LF).
Sourcepub const fn windows_line_endings(self) -> Self
pub const fn windows_line_endings(self) -> Self
Use Windows line endings (CRLF).
Sourcepub const fn encoding(self, config: EncodingConfig) -> Self
pub const fn encoding(self, config: EncodingConfig) -> Self
Set the encoding configuration.
Sourcepub fn logging(self, config: LoggingConfig) -> Self
pub fn logging(self, config: LoggingConfig) -> Self
Set the logging configuration.
Sourcepub fn log_to_file(self, path: impl Into<PathBuf>) -> Self
pub fn log_to_file(self, path: impl Into<PathBuf>) -> Self
Enable logging to a file.
Sourcepub fn build(self) -> SessionConfig
pub fn build(self) -> SessionConfig
Build the session configuration.
Trait Implementations§
Source§impl Clone for SessionBuilder
impl Clone for SessionBuilder
Source§fn clone(&self) -> SessionBuilder
fn clone(&self) -> SessionBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionBuilder
impl Debug for SessionBuilder
Source§impl Default for SessionBuilder
impl Default for SessionBuilder
Source§impl From<SessionBuilder> for SessionConfig
impl From<SessionBuilder> for SessionConfig
Source§fn from(builder: SessionBuilder) -> Self
fn from(builder: SessionBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SessionBuilder
impl RefUnwindSafe for SessionBuilder
impl Send for SessionBuilder
impl Sync for SessionBuilder
impl Unpin for SessionBuilder
impl UnwindSafe for SessionBuilder
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