pub struct ExampleDoc {
pub id: &'static str,
pub title: &'static str,
pub description: &'static str,
pub argv: &'static [&'static str],
pub setup: &'static [&'static [&'static str]],
pub expect: Expect,
}Expand description
One documented example of one command: what it shows, the argument vector it runs, what must happen when it runs, and anything that has to be done first. The argument vector is the canonical form; the command line a reader copies is rendered from it, never written out a second time.
Fields§
§id: &'static strUnique across the whole command line; the anchor of the example on its page.
title: &'static strOne line: what this example shows.
description: &'static strWhat it does and what comes back.
argv: &'static [&'static str]The arguments, without the executable’s own name.
setup: &'static [&'static [&'static str]]Commands run in the same repository before it, in order; usually empty.
expect: ExpectWhat the run must show.
Trait Implementations§
Source§impl Clone for ExampleDoc
impl Clone for ExampleDoc
Source§fn clone(&self) -> ExampleDoc
fn clone(&self) -> ExampleDoc
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 Copy for ExampleDoc
Source§impl Debug for ExampleDoc
impl Debug for ExampleDoc
impl Eq for ExampleDoc
Source§impl PartialEq for ExampleDoc
impl PartialEq for ExampleDoc
Source§fn eq(&self, other: &ExampleDoc) -> bool
fn eq(&self, other: &ExampleDoc) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExampleDoc
Auto Trait Implementations§
impl Freeze for ExampleDoc
impl RefUnwindSafe for ExampleDoc
impl Send for ExampleDoc
impl Sync for ExampleDoc
impl Unpin for ExampleDoc
impl UnsafeUnpin for ExampleDoc
impl UnwindSafe for ExampleDoc
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.