Skip to main content

source_code_span_impl

Macro source_code_span_impl 

Source
macro_rules! source_code_span_impl {
    ( $s:ident, Some, $member:ident ) => { ... };
    ( $s:ident, Some, $member:ident, $( $rest:tt ),+ ) => { ... };
    ( $s:ident, and_then, $member:ident ) => { ... };
    ( $s:ident, and_then, $member:ident, $( $rest:tt ),+ ) => { ... };
    ( $s:ident, $member:ident ) => { ... };
    ( $s:ident, $member:ident, $( $rest:tt ),+ ) => { ... };
}
Expand description

Public macro: implement SourceCodeSpan for a struct.

Syntax: source_code_span_impl!(StructName, [modifier,] member, [modifier,] member, …)

Each element is an optional modifier (Some or and_then) followed by a field name. Elements are combined left-to-right: spans are extended when both are present, or the non-None one is used when only one is present.