[−][src]Struct pretok::Pretoken
A pretoken object contains a slice of the Pretokenizer
input string
with lifetime a.
Fields
s: &'a str
The UTF-8 string slice.
line: usize
Number > 0 of the last line in this pretoken.
offset: usize
The byte offset of the first character in the pretoken.
Implementations
impl<'a> Pretoken<'a>
[src]
pub fn new(
start: StrCursor<'a>,
end: StrCursor<'a>,
line: usize,
offset: usize
) -> Pretoken<'a>
[src]
start: StrCursor<'a>,
end: StrCursor<'a>,
line: usize,
offset: usize
) -> Pretoken<'a>
The string for this pretoken is the slice between the specified cursors.
start
: The starting code point (inclusive).end
: The end code point (exclusive).offset
: The byte offset ofstart
from the front of the string used to initialize the Pretokenizer.
Trait Implementations
impl<'a> Clone for Pretoken<'a>
[src]
impl<'a> Debug for Pretoken<'a>
[src]
impl<'a> PartialEq<Pretoken<'a>> for Pretoken<'a>
[src]
impl<'a> StructuralPartialEq for Pretoken<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Pretoken<'a>
impl<'a> Send for Pretoken<'a>
impl<'a> Sync for Pretoken<'a>
impl<'a> Unpin for Pretoken<'a>
impl<'a> UnwindSafe for Pretoken<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,