If you have a type Foo that has some complex initialization that you don't really want to inline into each example for every method on Foo, you can instead do:
/// bar is an important method on Foo. It does things.
/// #Example
/// ```
/// # fn call_bar(foo: &Foo) {
/// let value = foo.bar();
/// # }
/// ```
fn bar(&self) -> u32 {
//...
}
This avoids having to type several lines of logic to initialize foo in a concise way without having to jump to doing a "```ignore".
If you have a type Foo that has some complex initialization that you don't really want to inline into each example for every method on Foo, you can instead do:
This avoids having to type several lines of logic to initialize
foo
in a concise way without having to jump to doing a "```ignore".