pub struct PartialContext { /* private fields */ }
Expand description
A Context that holds only an optional file name and 1-indexed start position
Intended to be constructed only from a FullContext
as a way of
discarding additional, unwanted information.
Implementations§
Source§impl PartialContext
impl PartialContext
Sourcepub fn get_file_name(&self) -> &Option<String>
pub fn get_file_name(&self) -> &Option<String>
Returns a reference to the optional file name
Sourcepub fn get_start_position(&self) -> &Position
pub fn get_start_position(&self) -> &Position
Returns a reference to the 1-indexed start position
Trait Implementations§
Source§impl Clone for PartialContext
impl Clone for PartialContext
Source§fn clone(&self) -> PartialContext
fn clone(&self) -> PartialContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PartialContext
impl Debug for PartialContext
Source§impl Display for PartialContext
impl Display for PartialContext
Source§impl From<FullContext> for PartialContext
impl From<FullContext> for PartialContext
Source§fn from(full: FullContext) -> PartialContext
fn from(full: FullContext) -> PartialContext
Converts to this type from the input type.
Source§impl PartialEq for PartialContext
impl PartialEq for PartialContext
impl Eq for PartialContext
impl StructuralPartialEq for PartialContext
Auto Trait Implementations§
impl Freeze for PartialContext
impl RefUnwindSafe for PartialContext
impl Send for PartialContext
impl Sync for PartialContext
impl Unpin for PartialContext
impl UnwindSafe for PartialContext
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