Crate sericom_core

Crate sericom_core 

Source
Expand description

sericom-core is the underlying library for sericom

As it sits right now, this library is largely meant to be solely used by sericom directly. Therefore, it is not intended to be used within other projects/crates.

If other projects develop a need to use this library within their projects, please create an issue so I can become aware and work towards making sericom-core a generalized/compatible library that is better suited for use among other crates.

Modules§

cli
This module holds the functions that are called from sericom when receiving CLI commands/arguments.
configs
This module handles the structuring, valid options, and parsing of user config files. User config files must be config.toml and are parsed with serde and respectively serde’s toml crate.
debug
As of now, there is only one function, run_debug_output, which is meant to debug the data being received over the serial connection. In future updates, this module is intended to be used for running tracing events with the tracing crate.
screen_buffer
This module contains the code needed for the implementation of a stateful buffer that holds a history of the lines/data received from the serial connection and the rendering/updating of the buffer to the terminal screen (stdout).
serial_actor
This module holds all of the code directly responsible for interacting with the serial connection and tasks within the program.

Macros§

create_recursive
Takes a &Path and first checks whether it exists or if it is a directory. If it doesn’t exist or is not a directory, it will create the directory recursively; creating the necessary parent directories.
map_miette
Used to add a .map_err() to function calls that return a Result<T, E> to provide better context for the error and print it nicely to stdout.