pub struct ExampleView {
pub id: String,
pub title: String,
pub description: String,
pub argv: Vec<String>,
pub command: String,
pub setup: Vec<SetupView>,
pub expectation: String,
}Expand description
One example, as every projection shows it. The command lines are rendered from the
declaration’s argv, never written out a second time, so what a reader copies is what
the example test executed.
Fields§
§id: StringThe example’s id, unique across the whole command line.
title: StringOne line: what this example shows.
description: StringWhat it does and what comes back.
argv: Vec<String>The argument vector, without the executable’s own name.
command: StringThe command line as a person types it, rendered from argv.
setup: Vec<SetupView>The commands that run before it in the same session; empty for an example that needs nothing prepared.
expectation: StringWhat the example test asserts, in one phrase; the evidence the page may cite.
Trait Implementations§
Source§impl Clone for ExampleView
impl Clone for ExampleView
Source§fn clone(&self) -> ExampleView
fn clone(&self) -> ExampleView
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 moreSource§impl Debug for ExampleView
impl Debug for ExampleView
impl Eq for ExampleView
Source§impl PartialEq for ExampleView
impl PartialEq for ExampleView
Source§fn eq(&self, other: &ExampleView) -> bool
fn eq(&self, other: &ExampleView) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExampleView
impl Serialize for ExampleView
impl StructuralPartialEq for ExampleView
Auto Trait Implementations§
impl Freeze for ExampleView
impl RefUnwindSafe for ExampleView
impl Send for ExampleView
impl Sync for ExampleView
impl Unpin for ExampleView
impl UnsafeUnpin for ExampleView
impl UnwindSafe for ExampleView
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,
§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.