pub struct Marker { /* private fields */ }Expand description
A location in a yaml document.
Implementations§
Source§impl Marker
impl Marker
Sourcepub fn new(index: usize, line: usize, col: usize) -> Marker
pub fn new(index: usize, line: usize, col: usize) -> Marker
Create a new Marker at the given position.
Sourcepub fn with_byte_offset(self, byte_offset: Option<usize>) -> Marker
pub fn with_byte_offset(self, byte_offset: Option<usize>) -> Marker
Return a copy of the marker with the given optional byte offset.
Sourcepub fn byte_offset(&self) -> Option<usize>
pub fn byte_offset(&self) -> Option<usize>
Return the byte offset of the marker in the source, if available.
Trait Implementations§
impl Copy for Marker
impl Eq for Marker
impl StructuralPartialEq for Marker
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnwindSafe for Marker
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