diff --git a/src/types/body.rs b/src/types/body.rs index 1a12d44..cf5e833 100644 --- a/src/types/body.rs +++ b/src/types/body.rs @@ -72,6 +72,9 @@ impl Body { #[cfg(feature = "gemtext")] #[allow(clippy::fallible_impl_from)] // It's really not fallible but thanks impl From> for Body { + /// Render a series of [`gemtext`] nodes to a `text/gemini` body without [normalizing] + /// + /// [normalizing]: Gemtext::normalize fn from(document: Vec) -> Self { let size: usize = document.iter().map(gemtext::Node::estimate_len).sum(); let mut bytes = Vec::with_capacity(size + document.len()); @@ -82,6 +85,9 @@ impl From> for Body { #[cfg(feature = "gemtext")] impl From for Body { + /// [Normalize][1] & eender a series of [`gemtext`] nodes to a `text/gemini` body + /// + /// [1]: Gemtext::normalize fn from(document: Gemtext) -> Self { document.normalize().build().into() }