Struct combine::stream::PointerOffset [−][src]
Expand description
Newtype around a pointer offset into a slice stream (&[T]
/&str
).
Implementations
Converts the pointer-based position into an indexed position.
let text = "b"; let err = token('a').easy_parse(text).unwrap_err(); assert_eq!(err.position.0, text.as_ptr() as usize); assert_eq!(err.map_position(|p| p.translate_position(text)).position, 0);
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for PointerOffset<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for PointerOffset<T> where
T: Send,
impl<T: ?Sized> Sync for PointerOffset<T> where
T: Sync,
impl<T: ?Sized> Unpin for PointerOffset<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for PointerOffset<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more