| Crates.io | rs3270 |
| lib.rs | rs3270 |
| version | 0.1.2 |
| created_at | 2023-07-04 04:12:11.50005+00 |
| updated_at | 2023-07-04 16:07:27.849459+00 |
| description | This library abstracts over interacting with the x3270 client. Simply provide the mainframe address and the scripting port for the client in order to immediately interact with the x3270 client programmatically. |
| homepage | |
| repository | https://github.com/AustinHellerRepo/rs3270 |
| max_upload_size | |
| id | 907632 |
| size | 62,603 |
This library abstracts over interacting with the x3270 client. Simply provide the mainframe address and the scripting port for the client in order to immediately interact with the x3270 client programmatically.
ClientSpawner implementation provides the means to spawn a Client.
CommandExecutor implementation provides the means to run commands against the connected client.CommandBuilder implementation utilizes a custom command! macro to simplify and reduce duplicate code.MainframeProvider struct provides functions that utilize one or more lower-level calls to the CommandExecutor, allowing for more complex operations.StreamCommandExecutor uses the CommandExecutor trait, so implementing your own and providing an instance to the MainframeProvider allows you to work with your own terminal emulator.
CommandBuilder implementations via the command! macro as neededThere are currently two levels of abstraction implemented in this library.
To use this lower-level abstraction, simply create an instance of TerminalConfiguration, spawn a Client with an implementation of ClientSpawner, and create a CommandExecutor. After which you will be able to execute CommandBuilder instances on the CommandExecutor that interact with the spawned client.
To use this higher-level abstraction, simply create an instance of a CommandExecutor as describe above and supply it to the new function of the MainframeProvider. With this struct you will be able to call convenient functions for interacting with the attached Client.
Example coming soon
This crate was inspired by two existing libraries from two different languages.