Browse Source

Merge remote-tracking branch 'upstream/main' into blank-line-doctest

pull/16/head
Emi Tatsuo 1 month ago
parent
commit
e44decab07
Signed by untrusted user: alch_emii GPG Key ID: 68FAB2E2E6DFC98B
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      gemtext/src/lib.rs

+ 9
- 0
gemtext/src/lib.rs View File

@ -109,6 +109,15 @@ impl AsMut<[Node]> for Builder {
}
}
impl From<Builder> for Vec<Node> {
/// Convert into a collection of [`Node`]s.
///
/// Equivilent to calling [`Builder::build()`]
fn from(builder: Builder) -> Self {
builder.build()
}
}
/// Render a set of nodes as a document to a writer.
pub fn render(nodes: impl AsRef<[Node]>, out: &mut impl Write) -> io::Result<()> {
use Node::*;


Loading…
Cancel
Save