Struct clingo::Location
[−]
[src]
pub struct Location(_);
Represents a source code location marking its beginnig and end.
Note: Not all locations refer to physical files. By convention, such locations use a name put in angular brackets as filename.
Methods
impl Location
[src]
pub fn new(
begin_file: &str,
end_file: &str,
begin_line: usize,
end_line: usize,
begin_column: usize,
end_column: usize
) -> Result<Location, NulError>
[src]
begin_file: &str,
end_file: &str,
begin_line: usize,
end_line: usize,
begin_column: usize,
end_column: usize
) -> Result<Location, NulError>
Create a new location.
Arguments
begin_file
- the file where the location beginsend_file
- the file where the location endsbegin_line
- the line where the location beginsend_line
- the line where the location endsbegin_column
- the column where the location beginsend_column
- the column where the location ends
Errors
NulError
- ifbegin_file
end_file
or contain a nul byte
pub fn begin_file(&self) -> Result<&str, Utf8Error>
[src]
the file where the location begins
pub fn end_file(&self) -> Result<&str, Utf8Error>
[src]
the file where the location ends
pub fn begin_line(&self) -> usize
[src]
the line where the location begins
pub fn end_line(&self) -> usize
[src]
the line where the location ends
pub fn begin_column(&self) -> usize
[src]
the column where the location begins
pub fn end_column(&self) -> usize
[src]
the column where the location ends
Trait Implementations
impl Debug for Location
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more