Struct lang_util::position::LexerPosition
source · pub struct LexerPosition {
pub source_id: FileId,
pub offset: TextSize,
}
Expand description
A position in the lexer’s input
Fields§
§source_id: FileId
Source id
offset: TextSize
Raw byte offset
Implementations§
Trait Implementations§
source§impl Clone for LexerPosition
impl Clone for LexerPosition
source§fn clone(&self) -> LexerPosition
fn clone(&self) -> LexerPosition
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 LexerPosition
impl Debug for LexerPosition
source§impl Default for LexerPosition
impl Default for LexerPosition
source§fn default() -> LexerPosition
fn default() -> LexerPosition
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for LexerPosition
impl<'de> Deserialize<'de> for LexerPosition
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for LexerPosition
impl Display for LexerPosition
source§impl From<LexerPosition> for FileId
impl From<LexerPosition> for FileId
source§fn from(value: LexerPosition) -> Self
fn from(value: LexerPosition) -> Self
Converts to this type from the input type.
source§impl From<LexerPosition> for TextSize
impl From<LexerPosition> for TextSize
source§fn from(value: LexerPosition) -> Self
fn from(value: LexerPosition) -> Self
Converts to this type from the input type.
source§impl Hash for LexerPosition
impl Hash for LexerPosition
source§impl Ord for LexerPosition
impl Ord for LexerPosition
source§fn cmp(&self, other: &LexerPosition) -> Ordering
fn cmp(&self, other: &LexerPosition) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LexerPosition
impl PartialEq for LexerPosition
source§impl PartialOrd for LexerPosition
impl PartialOrd for LexerPosition
source§impl Serialize for LexerPosition
impl Serialize for LexerPosition
impl Copy for LexerPosition
impl Eq for LexerPosition
impl StructuralPartialEq for LexerPosition
Auto Trait Implementations§
impl Freeze for LexerPosition
impl RefUnwindSafe for LexerPosition
impl Send for LexerPosition
impl Sync for LexerPosition
impl Unpin for LexerPosition
impl UnwindSafe for LexerPosition
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)