pub enum VerbatimOrigin {
Contracts,
Secrets,
RuntimeUse,
NotYetConverted,
}Expand description
Which family of residual, not-yet-converted emission a TsStmt::verbatim
statement came from. A closed enum, deliberately — “makes the ratchet a
compile-time construct, not a grep” (Q2’s own settling text). Named
file-by-file as Arc C actually needs them (ast_importers’s own five-file
floor is the precedent for how this track names residue), not
pre-populated for the whole ~19-slice Arc C schedule up front.
Deliberately not #[non_exhaustive]: a match over every variant —
in this crate, or in bynk-emit once Arc C reads it — must fail to
compile the moment a new variant is added, forcing every consumer to
account for it explicitly. A non-exhaustive enum would let a wildcard arm
silently absorb a new residue family instead, exactly the “grep, not a
compile-time construct” Q2’s own settling text rejected. P7.8’s own
grounding work found that Contracts/Secrets/RuntimeUse were seeded
against files that turn out not to need bynk-ts conversion at all
(design/tracks/the-typescript-tree.md §9) — recorded there, not fixed
by removing the variants here, since that’s separate follow-on work.
Variants§
Contracts
bynk-emit/src/emitter/contracts.rs.
Secrets
bynk-emit/src/emitter/secrets.rs.
RuntimeUse
bynk-emit/src/emitter/runtime_use.rs.
NotYetConverted
P7.6’s own transitional wrap (#1309): the whole of a still-String-
producing bynk-emit document (an entry point, compose.ts, the
runtime module, an adapter binding, a test module, …), carried into
Document::Ts so Artefacts never stores a bare String for TS
output (R7.8) even before Arc C converts the function that built it.
Deliberately not file-specific like the three variants above —
this is Arc B’s own infrastructure slice, not an Arc C conversion, so
it covers everything Arc C hasn’t reached yet, one call site per
document bynk-emit/src/project.rs/project/tests_emit.rs
constructs (not funnelled through a shared helper: a shared wrap
point would collapse every one of those call sites to a single
textual TsStmt::verbatim( occurrence, defeating verbatim_sites’
own purpose of counting how much is genuinely still unconverted).
Retires site by site as Arc C converts each underlying emitter
function to return a real TsProgram directly — at which point that
document’s own construction site stops calling TsStmt::verbatim at
all, not by this variant being deleted first.
Trait Implementations§
Source§impl Clone for VerbatimOrigin
impl Clone for VerbatimOrigin
Source§fn clone(&self) -> VerbatimOrigin
fn clone(&self) -> VerbatimOrigin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerbatimOrigin
impl Debug for VerbatimOrigin
Source§impl PartialEq for VerbatimOrigin
impl PartialEq for VerbatimOrigin
impl Copy for VerbatimOrigin
impl Eq for VerbatimOrigin
impl StructuralPartialEq for VerbatimOrigin
Auto Trait Implementations§
impl Freeze for VerbatimOrigin
impl RefUnwindSafe for VerbatimOrigin
impl Send for VerbatimOrigin
impl Sync for VerbatimOrigin
impl Unpin for VerbatimOrigin
impl UnsafeUnpin for VerbatimOrigin
impl UnwindSafe for VerbatimOrigin
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
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
§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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);