Struct lang_util::located::LocatedBuilder
source · pub struct LocatedBuilder { /* private fields */ }
Expand description
Builder for a Located struct
Implementations§
source§impl LocatedBuilder
impl LocatedBuilder
sourcepub fn current_file(self, file: impl Into<FileId>) -> Self
pub fn current_file(self, file: impl Into<FileId>) -> Self
Set the file identifier
sourcepub fn file_override(self, file_override: impl Into<FileOverride>) -> Self
pub fn file_override(self, file_override: impl Into<FileOverride>) -> Self
Set the source file override
sourcepub fn line_number(self, line_number: u32) -> Self
pub fn line_number(self, line_number: u32) -> Self
Set the resolved line number
sourcepub fn resolve(self, resolver: &impl Resolver) -> Self
pub fn resolve(self, resolver: &impl Resolver) -> Self
Resolve the raw offset (see LocatedBuilder::pos) to line and column information
sourcepub fn resolve_file(self, resolver: &(impl Resolver + HasFileNumber)) -> Self
pub fn resolve_file(self, resolver: &(impl Resolver + HasFileNumber)) -> Self
Resolve the raw offset (see LocatedBuilder::pos) to line and column information, and set the current file information
sourcepub fn resolve_path(self, resolver: &impl FileIdResolver) -> Self
pub fn resolve_path(self, resolver: &impl FileIdResolver) -> Self
Resolve the given file id into a path name, and store it in this builder
Trait Implementations§
source§impl Default for LocatedBuilder
impl Default for LocatedBuilder
source§fn default() -> LocatedBuilder
fn default() -> LocatedBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for LocatedBuilder
impl Send for LocatedBuilder
impl Sync for LocatedBuilder
impl Unpin for LocatedBuilder
impl UnwindSafe for LocatedBuilder
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