pub struct SourceLoadResult {
pub source: String,
pub is_range: bool,
pub start_line: Option<usize>,
pub end_line: Option<usize>,
pub line_count: usize,
}Expand description
Result of loading source code from disk.
Fields§
§source: StringThe loaded source code (possibly a line range extract).
is_range: boolWhether the source was loaded from a line range (start_line..end_line).
start_line: Option<usize>Starting line (1-indexed) if range was used.
end_line: Option<usize>Ending line (1-indexed, inclusive) if range was used.
line_count: usizeTotal lines in the loaded source.
Trait Implementations§
Source§impl Clone for SourceLoadResult
impl Clone for SourceLoadResult
Source§fn clone(&self) -> SourceLoadResult
fn clone(&self) -> SourceLoadResult
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 SourceLoadResult
impl Debug for SourceLoadResult
Auto Trait Implementations§
impl Freeze for SourceLoadResult
impl RefUnwindSafe for SourceLoadResult
impl Send for SourceLoadResult
impl Sync for SourceLoadResult
impl Unpin for SourceLoadResult
impl UnsafeUnpin for SourceLoadResult
impl UnwindSafe for SourceLoadResult
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