pub struct Span<I: Indexed> {
pub file: PathBuf,
pub range: Range<I>,
}
Fields§
§file: PathBuf
§range: Range<I>
Implementations§
Source§impl<I: Indexed> Span<I>
impl<I: Indexed> Span<I>
pub fn new<F: Into<PathBuf>>( row_start: Row<I>, row_end: Row<I>, col_start: Column<I>, col_end: Column<I>, file: F, ) -> Span<I>
pub fn from_range<F: Into<PathBuf>>(range: Range<I>, file: F) -> Span<I>
pub fn from_positions<F: Into<PathBuf>>( start: Position<I>, end: Position<I>, file: F, ) -> Span<I>
Source§impl Span<OneIndexed>
impl Span<OneIndexed>
pub fn zero_indexed(&self) -> Span<ZeroIndexed>
Source§impl Span<ZeroIndexed>
impl Span<ZeroIndexed>
pub fn one_indexed(&self) -> Span<OneIndexed>
Trait Implementations§
Source§impl<I: Ord + Indexed> Ord for Span<I>
impl<I: Ord + Indexed> Ord for Span<I>
Source§impl<I: PartialOrd + Indexed> PartialOrd for Span<I>
impl<I: PartialOrd + Indexed> PartialOrd for Span<I>
impl<I: Eq + Indexed> Eq for Span<I>
impl<I: Indexed> StructuralPartialEq for Span<I>
Auto Trait Implementations§
impl<I> Freeze for Span<I>
impl<I> RefUnwindSafe for Span<I>where
I: RefUnwindSafe,
impl<I> Send for Span<I>where
I: Send,
impl<I> Sync for Span<I>where
I: Sync,
impl<I> Unpin for Span<I>where
I: Unpin,
impl<I> UnwindSafe for Span<I>where
I: UnwindSafe,
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