pub struct Located<E> { /* private fields */ }
Expand description
Wraps an object with location data
Implementations§
source§impl<E> Located<E>
impl<E> Located<E>
sourcepub fn builder() -> LocatedBuilder
pub fn builder() -> LocatedBuilder
Create a builder for this located type
sourcepub fn map<F>(self, f: impl FnOnce(E) -> F) -> Located<F>
pub fn map<F>(self, f: impl FnOnce(E) -> F) -> Located<F>
Transform the inner value wrapped by this instance
Parameters
f
: function to apply to the inner value
sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
Return the inner value
sourcepub fn current_file(&self) -> Option<FileId>
pub fn current_file(&self) -> Option<FileId>
Get the current file identifier
sourcepub fn set_current_file(&mut self, current_file: FileId)
pub fn set_current_file(&mut self, current_file: FileId)
Set the current file identifier
Trait Implementations§
source§impl<E: Error> Error for Located<E>
impl<E: Error> Error for Located<E>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<E: PartialEq> PartialEq for Located<E>
impl<E: PartialEq> PartialEq for Located<E>
impl<E: Eq> Eq for Located<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for Located<E>where E: RefUnwindSafe,
impl<E> Send for Located<E>where E: Send,
impl<E> Sync for Located<E>where E: Sync,
impl<E> Unpin for Located<E>where E: Unpin,
impl<E> UnwindSafe for Located<E>where E: 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