Macro dot_ix_model::edge_id

source ·
edge_id!() { /* proc-macro */ }
Expand description

Returns a const EdgeId validated at compile time.

§Examples

Instantiate a valid EdgeId at compile time:

let _my_flow: dot_ix::model::common::EdgeId = edge_id!("valid_id"); // Ok!
//

If the ID is invalid, a compilation error is produced:


let _my_flow: dot_ix::model::common::EdgeId = edge_id!("-invalid_id"); // Compile error
//                                            ^^^^^^^^^^^^^^^^^^^^^^^
// error: "-invalid_id" is not a valid `EdgeId`.
//        `EdgeId`s must begin with a letter or underscore, and contain only letters, numbers, or underscores.