Enum Framing
pub enum Framing {
Pragmas,
WholeFile,
}Expand description
How a generator’s output relates to the file that holds it.
The pragma form of docs/design/11-documentation-plan.md §17.6 assumes the
output is Markdown, because the pragmas are HTML comments. pystub (D27)
broke that assumption: its three outputs under
crates/atune_py/python/atune/ are Python stubs, and a Python stub has no
HTML comment to hide a pragma in. This enum is the whole accommodation —
one method on the trait with a default, so the seven Markdown generators are
untouched.
Variants§
Pragmas
The default. The output is spliced between
<!-- Begin auto-generated {label} --> and <!-- End … -->, and every
byte outside the pragmas is the author’s.
WholeFile
The generator owns the file entirely: --mode write writes it (creating
it if absent) and --mode check compares every byte, trailing
newline included. There is no framing to preserve — which is the point:
framing-preservation exists so hand-written prose survives, and a file
with no hand-written prose has nothing to survive. The generated file
says so in its own first line, in its own comment syntax; that banner is
this mode’s pragma.
Trait Implementations§
impl Copy for Framing
impl Eq for Framing
impl StructuralPartialEq for Framing
Auto Trait Implementations§
impl Freeze for Framing
impl RefUnwindSafe for Framing
impl Send for Framing
impl Sync for Framing
impl Unpin for Framing
impl UnsafeUnpin for Framing
impl UnwindSafe for Framing
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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