Struct rustc_utils::source_map::range::ByteRange
source · pub struct ByteRange {
pub start: BytePos,
pub end: BytePos,
pub filename: FilenameIndex,
}
Fields§
§start: BytePos
§end: BytePos
§filename: FilenameIndex
Implementations§
source§impl ByteRange
impl ByteRange
pub fn as_char_range(&self, source_map: &SourceMap) -> CharRange
pub fn from_char_range( char_start: CharPos, char_end: CharPos, filename: FilenameIndex, source_map: &SourceMap ) -> Result<ByteRange>
pub fn from_span(span: Span, source_map: &SourceMap) -> Result<Self>
pub fn substr(&self, s: &str) -> String
Trait Implementations§
source§impl PartialEq for ByteRange
impl PartialEq for ByteRange
impl Copy for ByteRange
impl Eq for ByteRange
impl StructuralEq for ByteRange
impl StructuralPartialEq for ByteRange
Auto Trait Implementations§
impl RefUnwindSafe for ByteRange
impl Send for ByteRange
impl Sync for ByteRange
impl Unpin for ByteRange
impl UnwindSafe for ByteRange
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