Function from_lines

Source
pub fn from_lines<M, P, S>(
    message: M,
    path: P,
    lines: S,
    position: Position,
) -> Error<S>
where M: AsRef<str>, P: AsRef<Path>, S: AsRef<str>,
Expand description

Creates an Error with a message, path to source file a and source lines along with the relative position of the error

Positions are 1 based to align with what people see in their source file editors