workspacer-syntax 0.5.2

Generate and rehydrate Rust code signatures from AST nodes, supporting functions, structs, enums, traits, type aliases, and macros.
Documentation
1
2
3
4
5
6
7
8
9
10
// ---------------- [ File: workspacer-syntax/src/rehydrate.rs ]
crate::ix!();

pub trait RehydrateFromSignature: GenerateSignature + Sized {
    /// Attempt to reconstruct `Self` from a signature string (presumably
    /// produced by `generate_signature()`).
    ///
    /// Returns `None` if reconstruction fails.
    fn rehydrate_from_signature(signature_source: &str) -> Option<Self>;
}