pub enum Loc {
    Internal,
    Console {
        line: usize,
        column: usize,
    },
    File {
        name: String,
        line: usize,
        column: usize,
    },
}Expand description
Capture a location in a parse.
Typically parsers create instances of Loc and error messages
consume them.  However, it is also possible to look up where a
particular item is declared, and that may be helpful.
If you are not parsing a file, the simplest way to use this is to just make an “internal” instance.
use trivet::Loc;
let location = Loc::Internal;Variants§
Internal
This indicates that the source of an item is internal to the library; that is, it does not arise from parsing.
Console
This indicates that the source of an item is an unnamed stream. This might be appropriate for reading from standard input, for instance.
File
This indicates that the source of an item is a named stream, such as a file or URL.
Trait Implementations§
impl Eq for Loc
impl StructuralPartialEq for Loc
Auto Trait Implementations§
impl Freeze for Loc
impl RefUnwindSafe for Loc
impl Send for Loc
impl Sync for Loc
impl Unpin for Loc
impl UnwindSafe for Loc
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