[−][src]Crate interact
Interact
Interact is a framework for friendly online introspection of the running program state in an intuitive command-line interactive way.
While dynamically-typed interpreted languages offer the advantage of allowing to look at a running program state using a prompt, compiled languages often do not provide that feature. Being hard as it is to introduce interpreters into compiled languages, the Interact project aimes to provide a midway solution using stable Rust.
Design
Interact introduces a series of traits, the main ones are Access
and Deser
trait. Those
crates can be custom-derived using #[derive(Interact)]
, or be derived manually.
The Access
provides two methods that return special accessor trait object types. Please
read the documentation for the access
part of Interact.
The Deser
trait is a special deserializer that allows for online interactive hints at
non-ambiguous parse points.
Further relevent bits that comprise Interact are:
reflector
, when provided at type it will generate a representation of it, while handling reference cycles, imposed output limitations, mutexs, and customized in-process indirections.climber
, which when given a Rust-like expression of an inner value, knows how to go from an Interact root down to a field.
Usage
Unless you are manually extending types for use under Interact, you probably don't need this
to use the items in this crate directly. Instead, look for the interact_prompt
crate.
Re-exports
pub use crate::deser::Deser; |
pub use crate::access::derive::Enum; |
pub use crate::access::derive::ReflectEnum; |
pub use crate::access::derive::ReflectStruct; |
pub use crate::access::derive::Struct; |
pub use crate::access::derive::StructKind; |
pub use crate::access::iter::ReflectIter; |
pub use crate::access::deser_assign; |
pub use crate::access::Access; |
pub use crate::access::AssignError; |
pub use crate::access::CallError; |
pub use crate::access::Function; |
pub use crate::access::ImmutAccess; |
pub use crate::access::MutAccess; |
pub use crate::access::Reflect; |
pub use crate::access::ReflectDirect; |
pub use crate::access::ReflectIndirect; |
pub use crate::access::ReflectMut; |
pub use crate::access::RetValCallback; |
pub use interact_derive::derive_interact_extern_opqaue; |
pub use interact_derive::Interact; |
pub use crate::climber::ClimbError; |
pub use crate::climber::Climber; |
pub use crate::root::Root; |
pub use crate::root::RootLocal; |
pub use crate::root::RootSend; |
Modules
access | |
climber | |
deser | |
root |
Structs
Assist | Given a list of items, this provides assistance for completing them. |
NodeTree | |
Reflector | |
Token | |
TokenVec |
Enums
NextOptions | |
NodeInfo | |
TokenInner |