pub enum Body {
Prose(String),
Printed(String),
Plain(String),
}Expand description
What a gloss’s fold holds, and how the body should be set.
Three readings, not two, because a hook’s output sits between them: a program
printed it, so its line breaks are its own and must be kept, but it is
markdown often enough (headings, lists) that setting it as preformatted text
throws away structure a reader wants. Body::Printed is that middle
reading, and crate::render::Scribe::markdown_printed says what it costs.
Variants§
Prose(String)
Text composed as markdown, which reflows: a skill’s instructions, a rule pulled into context, a plan.
Printed(String)
Text a program printed, read as markdown but keeping its own line breaks.
Plain(String)
Output with no shape of its own, set exactly as it came.
Trait Implementations§
impl Eq for Body
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more