Struct sbnf::sbnf::TextLocation
source · pub struct TextLocation {
pub line: u32,
pub column: u32,
}
Fields§
§line: u32
§column: u32
Implementations§
source§impl TextLocation
impl TextLocation
pub const INITIAL: TextLocation = _
pub fn new(line: u32, column: u32) -> TextLocation
pub fn from_tuple((line, column): (u32, u32)) -> TextLocation
pub fn invalid() -> TextLocation
pub fn with_source<'a>(&'a self, source: &'a str) -> TextLocationWithSource<'_>
Trait Implementations§
source§impl Clone for TextLocation
impl Clone for TextLocation
source§fn clone(&self) -> TextLocation
fn clone(&self) -> TextLocation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextLocation
impl Debug for TextLocation
source§impl Display for TextLocation
impl Display for TextLocation
source§impl Hash for TextLocation
impl Hash for TextLocation
source§impl PartialEq for TextLocation
impl PartialEq for TextLocation
source§fn eq(&self, other: &TextLocation) -> bool
fn eq(&self, other: &TextLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TextLocation
impl Eq for TextLocation
impl StructuralEq for TextLocation
impl StructuralPartialEq for TextLocation
Auto Trait Implementations§
impl RefUnwindSafe for TextLocation
impl Send for TextLocation
impl Sync for TextLocation
impl Unpin for TextLocation
impl UnwindSafe for TextLocation
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.