pub struct CrossVariantUnit<'a> {
pub origin_variant: &'a str,
pub language: Language,
pub file_path: &'a str,
pub start_line: u32,
pub end_line: u32,
pub name: Option<&'a str>,
pub tokens: &'a [Token],
}Expand description
One unit offered to an explicit build-variant comparison.
The unit still records the variant that produced it. This is deliberately
not a BuildVariant-less intermediate representation: comparison is an
opt-in relation between independent programs, not another program.
Fields§
§origin_variant: &'a strFingerprint of the partition that produced this unit.
language: LanguageLanguage of the source unit.
file_path: &'a strReporting anchor relative to the scanned root.
start_line: u32Reporting anchor, 1-based.
end_line: u32Reporting anchor, 1-based.
name: Option<&'a str>The unit’s declared name, when parsing recovered it.
tokens: &'a [Token]Tokens covering precisely this unit.
Trait Implementations§
Source§impl<'a> Clone for CrossVariantUnit<'a>
impl<'a> Clone for CrossVariantUnit<'a>
Source§fn clone(&self) -> CrossVariantUnit<'a>
fn clone(&self) -> CrossVariantUnit<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for CrossVariantUnit<'a>
Auto Trait Implementations§
impl<'a> Freeze for CrossVariantUnit<'a>
impl<'a> RefUnwindSafe for CrossVariantUnit<'a>
impl<'a> Send for CrossVariantUnit<'a>
impl<'a> Sync for CrossVariantUnit<'a>
impl<'a> Unpin for CrossVariantUnit<'a>
impl<'a> UnsafeUnpin for CrossVariantUnit<'a>
impl<'a> UnwindSafe for CrossVariantUnit<'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