pub enum InputMode {
StringLiteral,
FileSlice,
Reconstructed,
Included,
CFile,
}Expand description
How the C source text of a file was obtained.
Variants§
StringLiteral
The macro input was a single Rust string literal.
FileSlice
The text was sliced out of the caller’s .rs file on disk.
Reconstructed
The text was rebuilt from the token spans’ line/column information.
Included
The text came from an #included file.
CFile
The text is a .c file an include_c99!("…") named.
Like an Included file in every way that
matters to a diagnostic — there is no span inside it, so the caret goes
on the macro invocation and the message carries path:line:col — and
unlike one in being a translation unit rather than something pulled
into one.
Trait Implementations§
impl Copy for InputMode
impl Eq for InputMode
impl StructuralPartialEq for InputMode
Auto Trait Implementations§
impl Freeze for InputMode
impl RefUnwindSafe for InputMode
impl Send for InputMode
impl Sync for InputMode
impl Unpin for InputMode
impl UnsafeUnpin for InputMode
impl UnwindSafe for InputMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more