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