pub struct FullFileSource<'a> {
pub source: &'a str,
pub file: Option<Arc<FileSource>>,
pub spans: Vec<(Arc<FileSource>, Span)>,
}Expand description
Full File Source
Fields§
§source: &'a strFlattened file source
file: Option<Arc<FileSource>>The top level file source
spans: Vec<(Arc<FileSource>, Span)>Files and their associated spans in the flattend file source
Implementations§
Source§impl FullFileSource<'_>
impl FullFileSource<'_>
Sourcepub fn relative_span_by_pos(&self, start: usize, end: usize) -> Span
pub fn relative_span_by_pos(&self, start: usize, end: usize) -> Span
Get the relative span by position. Because the file source is flattened, we need to find the correct file source.
Trait Implementations§
Source§impl<'a> Clone for FullFileSource<'a>
impl<'a> Clone for FullFileSource<'a>
Source§impl<'a> Debug for FullFileSource<'a>
impl<'a> Debug for FullFileSource<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for FullFileSource<'a>
impl<'de: 'a, 'a> Deserialize<'de> for FullFileSource<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Eq for FullFileSource<'a>
Source§impl<'a> Ord for FullFileSource<'a>
impl<'a> Ord for FullFileSource<'a>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialEq for FullFileSource<'a>
impl<'a> PartialEq for FullFileSource<'a>
Source§impl<'a> PartialOrd for FullFileSource<'a>
impl<'a> PartialOrd for FullFileSource<'a>
Source§impl<'a> Serialize for FullFileSource<'a>
impl<'a> Serialize for FullFileSource<'a>
impl<'a> StructuralPartialEq for FullFileSource<'a>
Auto Trait Implementations§
impl<'a> Freeze for FullFileSource<'a>
impl<'a> RefUnwindSafe for FullFileSource<'a>
impl<'a> Send for FullFileSource<'a>
impl<'a> Sync for FullFileSource<'a>
impl<'a> Unpin for FullFileSource<'a>
impl<'a> UnsafeUnpin for FullFileSource<'a>
impl<'a> UnwindSafe for FullFileSource<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes