pub struct LibTest {
pub file: Option<PathBuf>,
pub line: usize,
pub name: String,
pub accepts: Vec<String>,
pub reads: Vec<(String, String)>,
pub rejects: Vec<String>,
}Expand description
One test line of a pattern file: the texts a name matches as a whole
and the texts it matches nowhere in.
Fields§
§file: Option<PathBuf>The pattern file the line is in, where the set was declared from one.
line: usizeThe line’s number in its text, from one.
name: StringThe name under test: a declared shape, kind or sub-pattern, or a library entry.
accepts: Vec<String>The texts the name matches as a whole, from the first significant token to the last.
reads: Vec<(String, String)>The spans the name reads out of a larger text, as (span, text).
What accepts cannot say. A kind read from the tokens around it takes
part of a line and leaves the rest, so the whole extent is the wrong
expectation for it: the question is which bytes it took, and out of
what.
rejects: Vec<String>The texts the name matches nowhere in.
Trait Implementations§
impl Eq for LibTest
impl StructuralPartialEq for LibTest
Auto Trait Implementations§
impl Freeze for LibTest
impl RefUnwindSafe for LibTest
impl Send for LibTest
impl Sync for LibTest
impl Unpin for LibTest
impl UnsafeUnpin for LibTest
impl UnwindSafe for LibTest
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