### RuntimeBuilder::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.RuntimeBuilder.html Initializes a new runtime home directory. ```APIDOC ## fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The binary root path. - **home** (PathBuf) - The home directory path. ### Returns - **Result** - The initialized runtime or an error. ``` -------------------------------- ### FishRuntimeBuilder::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes a new runtime's home directory. ```APIDOC ### fn new(bin_root: PathBuf, home: PathBuf) -> Result Initializes a new runtime's home directory using the provided binary root and home path. ``` -------------------------------- ### BashRuntimeBuilder::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes a new runtime's home directory. ```APIDOC ## fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory using the provided binary root and home path. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The home directory for the runtime. ### Returns - **Result** - Returns the newly initialized runtime or an error if initialization fails. ``` -------------------------------- ### FishRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search= Initializes a new Fish runtime instance with the specified binary root and home directory. ```APIDOC ## pub fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initialize a new runtime’s home directory. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The home directory for the runtime. ``` -------------------------------- ### BashRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html Initializes a new BashRuntime instance with the specified binary root and home directory. ```APIDOC ## pub fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The home directory for the runtime. ``` -------------------------------- ### ZshRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=u32+-%3E+bool Initializes a new Zsh runtime instance with the specified binary root and home directory. ```APIDOC ## pub fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory for Zsh. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The home directory for the runtime. ``` -------------------------------- ### ZshRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=std%3A%3Avec Initializes a new Zsh runtime environment with the specified binary root and home directory. ```APIDOC ### pub fn new(bin_root: PathBuf, home: PathBuf) -> Result Initializes a new runtime's home directory. ``` -------------------------------- ### ZshRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes a new Zsh runtime environment at the specified home directory. ```APIDOC ## pub fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The directory to be used as the runtime home. ``` -------------------------------- ### ElvishRuntime::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntime.html Initializes a new Elvish runtime instance with the specified binary root and home directory. ```APIDOC ## pub fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The home directory for the runtime. ``` -------------------------------- ### ZshRuntimeBuilder::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes a new Zsh runtime home directory. ```APIDOC ## fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory using the provided binary root and home path. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The home directory for the runtime. ``` -------------------------------- ### ElvishRuntime::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntime.html Reuses an existing runtime's home directory to initialize the ElvishRuntime. ```APIDOC ## pub fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Reuse an existing runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The existing home directory. ``` -------------------------------- ### ElvishRuntimeBuilder::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntimeBuilder.html?search=u32+-%3E+bool Initializes a new runtime home for the Elvish shell environment. ```APIDOC ## fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory for the Elvish shell. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The home directory for the runtime. ### Returns - **Result** - Returns the initialized runtime or an error if initialization fails. ``` -------------------------------- ### FishRuntime::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search= Reuses an existing runtime home directory to initialize a FishRuntime instance. ```APIDOC ## pub fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Reuse an existing runtime’s home directory. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The existing home directory. ``` -------------------------------- ### fn home(&self) -> &Path Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search= Returns the location of the runtime's home directory. ```APIDOC ### fn home(&self) -> &Path Returns the location of the runtime's home directory. ``` -------------------------------- ### BashRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Simulates typing input into the shell and returns the resulting completion output. ```APIDOC ## BashRuntime::complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing the provided input into the shell. ### Parameters - **input** (str) - The input string to type into the shell. - **term** (Term) - The terminal configuration to use. ``` -------------------------------- ### ZshRuntime::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=std%3A%3Avec Reuses an existing runtime home directory to initialize the ZshRuntime. ```APIDOC ### pub fn with_home(bin_root: PathBuf, home: PathBuf) -> Result Reuse an existing runtime's home. ``` -------------------------------- ### BashRuntime::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html Reuses an existing runtime's home directory to initialize a BashRuntime instance. ```APIDOC ## pub fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Reuse an existing runtime's home. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The existing home directory to reuse. ``` -------------------------------- ### FishRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search=u32+-%3E+bool Simulates typing input into the shell and returns the output. ```APIDOC ## pub fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing `input` into the shell using the provided terminal configuration. ### Parameters - **input** (&str) - The input string to type. - **term** (&Term) - The terminal configuration to use. ``` -------------------------------- ### ZshRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=u32+-%3E+bool Simulates typing input into the shell and returns the resulting output. ```APIDOC ## pub fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing the provided input into the shell. ### Parameters - **input** (str) - The input string to type into the shell. - **term** (Term) - The terminal configuration. ``` -------------------------------- ### FishRuntimeBuilder::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Reuses an existing runtime's home directory. ```APIDOC ### fn with_home(bin_root: PathBuf, home: PathBuf) -> Result Configures the builder to reuse an existing runtime's home directory. ``` -------------------------------- ### RuntimeBuilder::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.RuntimeBuilder.html Reuses an existing runtime home directory. ```APIDOC ## fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Configures the builder to reuse an existing runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The binary root path. - **home** (PathBuf) - The existing home directory path. ### Returns - **Result** - The runtime instance or an error. ``` -------------------------------- ### fn complete(&mut self, input: &str, term: &Term) -> Result Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search= Retrieves the output from typing the provided input into the shell. ```APIDOC ### fn complete(&mut self, input: &str, term: &Term) -> Result Get the output from typing `input` into the shell. - **input** (&str) - The input string to complete. - **term** (&Term) - The terminal configuration. ``` -------------------------------- ### fn register(&mut self, name: &str, content: &str) -> Result<(), Error> Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search= Registers a completion script with the runtime. ```APIDOC ### fn register(&mut self, name: &str, content: &str) -> Result<(), Error> Registers a completion script with the runtime. - **name** (&str) - The name of the completion script. - **content** (&str) - The content of the completion script. ``` -------------------------------- ### BashRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html?search=u32+-%3E+bool Executes an input string in the shell and returns the output. ```APIDOC ## pub fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing `input` into the shell. ### Parameters - **input** (&str) - The input string to type into the shell. - **term** (&Term) - The terminal configuration. ``` -------------------------------- ### BashRuntimeBuilder::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Reuses an existing runtime's home directory. ```APIDOC ## fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Attempts to reuse an existing runtime's home directory for the specified binary root. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The existing home directory to reuse. ### Returns - **Result** - Returns the runtime instance or an error if the home cannot be reused. ``` -------------------------------- ### Run shell completions with BashRuntime Source: https://docs.rs/completest-pty/1.1.0/completest_pty/index.html?search= Initializes a terminal and a Bash runtime to execute and capture completion output for a registered command. ```rust let term = completest_pty::Term::new(); let mut runtime = completest_pty::BashRuntime::new(bin_root, home).unwrap(); runtime.register("foo", completion_script).unwrap(); let output = runtime.complete("foo \t\t", &term).unwrap(); ``` -------------------------------- ### BashRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html Executes a completion input against the shell and returns the output. ```APIDOC ## pub fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing `input` into the shell. ### Parameters - **input** (&str) - Required - The input string to complete. - **term** (&Term) - Required - The terminal configuration. ``` -------------------------------- ### ElvishRuntimeBuilder::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntimeBuilder.html?search=u32+-%3E+bool Reuses an existing runtime home for the Elvish shell environment. ```APIDOC ## fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Attempts to reuse an existing runtime's home directory for the Elvish shell. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The existing home directory to reuse. ### Returns - **Result** - Returns the runtime instance or an error if the home cannot be reused. ``` -------------------------------- ### ZshRuntime::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search= Reuses an existing Zsh runtime home directory. ```APIDOC ## pub fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Reuse an existing runtime's home directory. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The existing home directory. ``` -------------------------------- ### Runtime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html Executes a completion request for a given input string. ```APIDOC ## fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Gets the output from typing the provided input into the shell. ### Parameters - **input** (&str) - The input string to complete. - **term** (&Term) - The terminal configuration. ### Returns - **Result** - Returns the completion output string if successful, otherwise returns an Error. ``` -------------------------------- ### ZshRuntime::home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html?search=std%3A%3Avec Returns the path to the runtime's home directory. ```APIDOC ### pub fn home(&self) -> &Path Returns the location of the runtime's home directory. ``` -------------------------------- ### ZshRuntimeBuilder::with_home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Reuses an existing Zsh runtime home directory. ```APIDOC ## fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Attempts to reuse an existing runtime's home directory. ### Parameters - **bin_root** (PathBuf) - Required - The root directory for binaries. - **home** (PathBuf) - Required - The existing home directory to reuse. ``` -------------------------------- ### Term Configuration Methods Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Methods to configure the terminal dimensions. ```APIDOC ### pub fn width(self, width: u16) -> Term Sets the width of the terminal. ### pub fn height(self, height: u16) -> Term Sets the height of the terminal. ``` -------------------------------- ### Runtime::register Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html Registers a completion script with the runtime. ```APIDOC ## fn register(&mut self, name: &str, content: &str) -> Result<(), Error> ### Description Registers a completion script for the specified name. ### Parameters - **name** (&str) - The name of the completion script. - **content** (&str) - The content of the completion script. ### Returns - **Result<(), Error>** - Returns Ok if registration is successful, otherwise returns an Error. ``` -------------------------------- ### FishRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html Executes a completion request against the shell. ```APIDOC ## fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Get the output from typing the provided input into the shell. ### Parameters - **input** (&str) - The input string to complete. - **term** (&Term) - The terminal configuration. ``` -------------------------------- ### FishRuntime::home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search= Retrieves the path to the runtime's home directory. ```APIDOC ## pub fn home(&self) -> &Path ### Description Returns the location of the runtime’s home directory. ``` -------------------------------- ### Runtime::home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html Returns the location of the runtime's home directory. ```APIDOC ## fn home(&self) -> &Path ### Description Returns the location of the runtime's home directory. ### Signature `fn home(&self) -> &Path` ``` -------------------------------- ### ElvishRuntime::complete Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntime.html Generates completion output based on the provided input and terminal context. ```APIDOC ## pub fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Gets the output from typing the input into the shell. ### Parameters - **input** (&str) - The input string to complete. - **term** (&Term) - The terminal context. ``` -------------------------------- ### ZshRuntime::register Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html Registers a completion script with the Zsh runtime. ```APIDOC ## pub fn register(&mut self, name: &str, content: &str) -> Result<()> ### Description Register a completion script. ### Parameters - **name** (&str) - Required - The name of the completion script. - **content** (&str) - Required - The content of the completion script. ``` -------------------------------- ### FishRuntime::register Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search= Registers a completion script within the runtime. ```APIDOC ## pub fn register(&mut self, name: &str, content: &str) -> Result<()> ### Description Register a completion script with a given name and content. ### Parameters - **name** (&str) - Required - The name of the completion script. - **content** (&str) - Required - The content of the completion script. ``` -------------------------------- ### RuntimeBuilder::name Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.RuntimeBuilder.html Returns the name of the runtime, which is useful for defining a home directory. ```APIDOC ## fn name() -> &'static str ### Description Returns the name of the runtime. ### Returns - **&'static str** - The name of the runtime. ``` -------------------------------- ### BashRuntime::home Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html Retrieves the location of the runtime's home directory. ```APIDOC ## pub fn home(&self) -> &Path ### Description Returns the path to the runtime's home directory. ``` -------------------------------- ### BashRuntime::register Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html Registers a completion script within the BashRuntime. ```APIDOC ## pub fn register(&mut self, _name: &str, content: &str) -> Result<()> ### Description Registers a completion script with the given name and content. ### Parameters - **_name** (&str) - Required - The name of the completion script. - **content** (&str) - Required - The content of the completion script. ``` -------------------------------- ### BashRuntimeBuilder::name Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntimeBuilder.html?search=std%3A%3Avec Retrieves the name of the runtime. ```APIDOC ## fn name() -> &'static str ### Description Returns the name for the runtime, which is useful for defining a home directory. ### Returns - **&'static str** - The name of the runtime. ``` -------------------------------- ### Runtime Trait Methods Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search=std%3A%3Avec The Runtime trait provides methods to manage shell runtime environments, including retrieving the home directory, registering scripts, and generating completions. ```APIDOC ## fn home(&self) -> &Path ### Description Returns the location of the runtime’s home directory. ## fn register(&mut self, name: &str, content: &str) -> Result<(), Error> ### Description Registers a completion script with the given name and content. ## fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Generates completion output by simulating typing the provided input into the shell terminal. ``` -------------------------------- ### BashRuntimeBuilder Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntimeBuilder.html The BashRuntimeBuilder struct provides methods to initialize or reuse a Bash runtime environment. ```APIDOC ## BashRuntimeBuilder ### Description An abstract factory for creating or managing a `BashRuntime` instance. It is available on Unix platforms only. ### Methods #### new(bin_root: PathBuf, home: PathBuf) -> Result Initializes a new runtime's home directory. #### with_home(bin_root: PathBuf, home: PathBuf) -> Result Reuses an existing runtime's home directory. #### name() -> &'static str Returns the name of the runtime, which is useful for defining a home directory. ``` -------------------------------- ### ElvishRuntime::register Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntime.html Registers a completion script within the runtime. ```APIDOC ## pub fn register(&mut self, _name: &str, content: &str) -> Result<()> ### Description Registers a completion script with a given name and content. ### Parameters - **_name** (&str) - The name of the completion script. - **content** (&str) - The content of the completion script. ``` -------------------------------- ### Term::width Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search= Sets the width of the terminal. ```APIDOC ### pub fn width(self, width: u16) -> Term Sets the width of the terminal and returns the modified Term instance. ``` -------------------------------- ### Runtime Trait Methods Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search=u32+-%3E+bool The Runtime trait provides methods to manage shell completion environments. ```APIDOC ## fn home(&self) -> &Path ### Description Returns the location of the runtime's home directory. ## fn register(&mut self, name: &str, content: &str) -> Result<(), Error> ### Description Registers a completion script with the given name and content. ## fn complete(&mut self, input: &str, term: &Term) -> Result ### Description Generates completion output based on the provided input string and terminal configuration. ``` -------------------------------- ### Term::new Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search= Creates a new instance of the Term struct. ```APIDOC ### pub fn new() -> Term Creates a new terminal instance. ``` -------------------------------- ### Term::height Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search= Sets the height of the terminal. ```APIDOC ### pub fn height(self, height: u16) -> Term Sets the height of the terminal and returns the modified Term instance. ``` -------------------------------- ### ElvishRuntime Definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntime.html The structure definition for the Elvish runtime. ```rust pub struct ElvishRuntime { /* private fields */ } ``` -------------------------------- ### BashRuntime struct definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntime.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E The primary structure for managing the Bash runtime environment. ```rust pub struct BashRuntime { /* private fields */ } ``` -------------------------------- ### ZshRuntimeBuilder Definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntimeBuilder.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E The definition of the ZshRuntimeBuilder struct. ```rust #[non_exhaustive] pub struct ZshRuntimeBuilder {} ``` -------------------------------- ### Term Getter Methods Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Methods to retrieve the current terminal dimensions. ```APIDOC ### pub fn get_width(&self) -> u16 Returns the current width of the terminal. ### pub fn get_height(&self) -> u16 Returns the current height of the terminal. ``` -------------------------------- ### RuntimeBuilder Trait Methods Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.RuntimeBuilder.html?search= Methods required to implement the RuntimeBuilder trait for creating shell runtimes. ```APIDOC ## fn name() -> &'static str ### Description Returns the name of the runtime, which is useful for defining a home directory. ## fn new(bin_root: PathBuf, home: PathBuf) -> Result ### Description Initializes a new runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The home directory for the runtime. ## fn with_home(bin_root: PathBuf, home: PathBuf) -> Result ### Description Reuses an existing runtime's home directory. ### Parameters - **bin_root** (PathBuf) - The root directory for binaries. - **home** (PathBuf) - The existing home directory to reuse. ``` -------------------------------- ### BashRuntimeBuilder Definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.BashRuntimeBuilder.html?search= The definition of the BashRuntimeBuilder struct. ```rust #[non_exhaustive] pub struct BashRuntimeBuilder {} ``` -------------------------------- ### Term::get_height Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search= Retrieves the current height of the terminal. ```APIDOC ### pub fn get_height(&self) -> u16 Returns the current height of the terminal as a u16. ``` -------------------------------- ### Term::get_width Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search= Retrieves the current width of the terminal. ```APIDOC ### pub fn get_width(&self) -> u16 Returns the current width of the terminal as a u16. ``` -------------------------------- ### Term API Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html Methods available for the Term struct to manage terminal properties. ```APIDOC ## pub fn new() -> Term ### Description Creates a new instance of Term. ## pub fn width(self, width: u16) -> Term ### Description Sets the width of the terminal. ## pub fn height(self, height: u16) -> Term ### Description Sets the height of the terminal. ## pub fn get_width(&self) -> u16 ### Description Returns the current width of the terminal. ## pub fn get_height(&self) -> u16 ### Description Returns the current height of the terminal. ``` -------------------------------- ### FishRuntime struct definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntime.html?search= The primary structure for managing the Fish shell runtime environment. ```rust pub struct FishRuntime { /* private fields */ } ``` -------------------------------- ### RuntimeBuilder Trait Definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.RuntimeBuilder.html?search= The core trait definition for building shell runtimes, requiring a name and methods for creating or reusing a runtime home. ```rust pub trait RuntimeBuilder: Debug { type Runtime: Runtime; // Required methods fn name() -> &'static str; fn new(bin_root: PathBuf, home: PathBuf) -> Result; fn with_home( bin_root: PathBuf, home: PathBuf, ) -> Result; } ``` -------------------------------- ### Define ElvishRuntimeBuilder Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ElvishRuntimeBuilder.html?search=u32+-%3E+bool The structure definition for the ElvishRuntimeBuilder, marked as non-exhaustive. ```rust #[non_exhaustive] pub struct ElvishRuntimeBuilder {} ``` -------------------------------- ### Runtime Trait Definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/trait.Runtime.html?search= The core trait definition for shell completion runtimes. Implementations must be Debug-compatible and are restricted to Unix platforms. ```rust pub trait Runtime: Debug { // Required methods fn home(&self) -> &Path; fn register(&mut self, name: &str, content: &str) -> Result<(), Error>; fn complete(&mut self, input: &str, term: &Term) -> Result; } ``` -------------------------------- ### Define FishRuntimeBuilder struct Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.FishRuntimeBuilder.html?search= The FishRuntimeBuilder struct is marked as non-exhaustive. ```rust #[non_exhaustive] pub struct FishRuntimeBuilder {} ``` -------------------------------- ### ZshRuntime struct definition Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.ZshRuntime.html The definition of the ZshRuntime struct, which contains private fields. ```rust pub struct ZshRuntime { /* private fields */ } ``` -------------------------------- ### Define Term struct Source: https://docs.rs/completest-pty/1.1.0/completest_pty/struct.Term.html?search=std%3A%3Avec The definition of the Term struct with private fields. ```rust pub struct Term { /* private fields */ } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.