| 3557 |
3557 |
|
self
|
| 3558 |
3558 |
|
}
|
| 3559 |
3559 |
|
|
|
3560 |
+ |
/// Offer one more option, chaining.
|
|
3561 |
+ |
///
|
|
3562 |
+ |
/// The accreting half of [`Self::options`], which takes the whole list. The
|
|
3563 |
+ |
/// fifth constructor of exactly this shape, after [`Table::column`],
|
|
3564 |
+ |
/// [`Cells::cell`], [`Self::options`] itself and [`Node::figure`]: a caller
|
|
3565 |
+ |
/// building its options one at a time has no expression to hold a list in.
|
|
3566 |
+ |
/// MNW's repository bar is the site -- its ref chooser offers a branch or a
|
|
3567 |
+ |
/// tag per ref, and which of the two decides only the label.
|
|
3568 |
+ |
#[must_use]
|
|
3569 |
+ |
pub fn option(mut self, option: Choice) -> Self {
|
|
3570 |
+ |
self.options.push(option);
|
|
3571 |
+ |
self
|
|
3572 |
+ |
}
|
|
3573 |
+ |
|
| 3560 |
3574 |
|
pub fn select(name: impl Into<String>, label: impl Into<String>, options: Vec<Choice>) -> Self {
|
| 3561 |
3575 |
|
Self {
|
| 3562 |
3576 |
|
options,
|
| 7671 |
7685 |
|
}
|
| 7672 |
7686 |
|
}
|
| 7673 |
7687 |
|
|
|
7688 |
+ |
impl From<Field> for Node {
|
|
7689 |
+ |
/// A question inside a body, without the enclosing container naming the
|
|
7690 |
+ |
/// variant. The third of these, after `From<Slot>` and `From<Act>` above,
|
|
7691 |
+ |
/// and for their reason: a shape that returns a `Field` has to be placeable
|
|
7692 |
+ |
/// where a node goes. MNW's repository bar is the site -- its ref chooser
|
|
7693 |
+ |
/// is a shape of its own and the bar holds it beside the tab strip.
|
|
7694 |
+ |
fn from(field: Field) -> Self {
|
|
7695 |
+ |
Self::Field(::std::boxed::Box::new(field))
|
|
7696 |
+ |
}
|
|
7697 |
+ |
}
|
|
7698 |
+ |
|
| 7674 |
7699 |
|
impl From<Table> for Node {
|
| 7675 |
7700 |
|
fn from(table: Table) -> Self {
|
| 7676 |
7701 |
|
Self::Table {
|
| 8674 |
8699 |
|
}
|
| 8675 |
8700 |
|
}
|
| 8676 |
8701 |
|
|
|
8702 |
+ |
/// Machine text a lexer has been over, inline.
|
|
8703 |
+ |
///
|
|
8704 |
+ |
/// The constructor [`literal`](Self::literal) reserved for the screen that
|
|
8705 |
+ |
/// asked, and MNW's source browser is it: a file is drawn one row per line,
|
|
8706 |
+ |
/// because `#L42` is the address of a line and a block that owned its own
|
|
8707 |
+ |
/// lines would have nothing to hang one on. So every line is classified
|
|
8708 |
+ |
/// runs plus the extension, and `literal`'s one-plain-run shape cannot say
|
|
8709 |
+ |
/// it.
|
|
8710 |
+ |
///
|
|
8711 |
+ |
/// Still inline. A block is the other half and is still unasked for.
|
|
8712 |
+ |
#[must_use]
|
|
8713 |
+ |
pub fn code(runs: Vec<Lexeme>, language: Option<String>) -> Self {
|
|
8714 |
+ |
Self::Code {
|
|
8715 |
+ |
runs,
|
|
8716 |
+ |
language,
|
|
8717 |
+ |
inline: true,
|
|
8718 |
+ |
}
|
|
8719 |
+ |
}
|
|
8720 |
+ |
|
| 8677 |
8721 |
|
/// Prose written in markdown, by somebody the app does not vouch for.
|
| 8678 |
8722 |
|
///
|
| 8679 |
8723 |
|
/// [`Richness::Sentence`] and [`Trust::Untrusted`], which is what this member
|