pub struct DocTest {
pub name: String,
pub place: String,
pub text: String,
pub file: String,
pub start: u32,
pub lines: Vec<Origin>,
pub unknown: Vec<String>,
}Expand description
A doc test: one Nova code block of the docs a library’s site shows, as a test module (spec §5).
Fields§
§name: Stringshapes::circle (src/lib.nova:41) (spec §5.3).
place: Stringsrc/lib.nova:41: where the block starts, which an unknown word’s
warning names (spec §4.2).
text: StringThe module’s text (spec §5), ending in a line break.
file: StringThe block’s file, by its name in the program’s FileDb: the path
the loader read it from, as Path::display writes it, or
<std/time> for std’s.
start: u32Where the block starts in file: its opening fence, or an indented
block’s first line, which added lines map to (spec §7).
lines: Vec<Origin>Where each line of text comes from.
unknown: Vec<String>The words after nova that mean nothing (spec §4.2).
Implementations§
Trait Implementations§
impl Eq for DocTest
impl StructuralPartialEq for DocTest
Auto Trait Implementations§
impl Freeze for DocTest
impl RefUnwindSafe for DocTest
impl Send for DocTest
impl Sync for DocTest
impl Unpin for DocTest
impl UnsafeUnpin for DocTest
impl UnwindSafe for DocTest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.