#[repr(C)]pub struct Input { /* private fields */ }
Expand description
Representation of the source code.
Implementations§
Source§impl Input
impl Input
Sourcepub fn update_bytes(&mut self, bytes: Vec<u8>)
pub fn update_bytes(&mut self, bytes: Vec<u8>)
Populates Input
with a given byte array
Sourcepub fn line_col_for_pos(&self, pos: usize) -> Option<(usize, usize)>
pub fn line_col_for_pos(&self, pos: usize) -> Option<(usize, usize)>
Returns (line, col) pair for a given byte offset.
Returns None if given offset is out of range.
Returns raw bytes after decoding
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Converts itself into owned vector of bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Input
impl !RefUnwindSafe for Input
impl !Send for Input
impl !Sync for Input
impl Unpin for Input
impl !UnwindSafe for Input
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