pub struct SourceFileBuilder { /* private fields */ }Expand description
A Builder for constructing a SourceFile
Implementations§
Source§impl SourceFileBuilder
impl SourceFileBuilder
Sourcepub fn new<Name: Into<Box<str>>, Code: Into<Box<str>>>(
name: Name,
code: Code,
) -> Self
pub fn new<Name: Into<Box<str>>, Code: Into<Box<str>>>( name: Name, code: Code, ) -> Self
Creates a new builder for a file named name.
pub fn line_index(self, index: LineIndex) -> Self
pub fn set_line_index(&mut self, index: LineIndex)
Sourcepub fn finish(self) -> SourceFile
pub fn finish(self) -> SourceFile
Consumes self and returns the SourceFile.
Auto Trait Implementations§
impl Freeze for SourceFileBuilder
impl RefUnwindSafe for SourceFileBuilder
impl Send for SourceFileBuilder
impl Sync for SourceFileBuilder
impl Unpin for SourceFileBuilder
impl UnwindSafe for SourceFileBuilder
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