pub enum Expansion {
Complete(String),
Blocked {
holes: Vec<Hole>,
},
}Expand description
What expanding a fragment produced.
There are two outcomes and no third: either the text is complete, or it is blocked and no text comes back at all. Half-expanded source reads as ground truth to whatever parses it next and is not, so this type cannot represent it.
Deliberately not #[non_exhaustive], unlike the record types around
it. A caller must handle both arms, and that is the guarantee — a wildcard
arm written today to satisfy the attribute is exactly where a third
outcome would land unnoticed tomorrow. A new variant here would be a
change every embedder must see, so it should break their build.
Variants§
Complete(String)
Every expansion resolved. This is exactly the text the command reads on stdin, given the scope that was supplied.
Blocked
A $(…) stands between the body and its final text. Running it is a
decision with a clock and a blast radius, so the kernel returns the
question instead of answering it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expansion
impl<'de> Deserialize<'de> for Expansion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expansion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expansion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Expansion
Source§impl Serialize for Expansion
impl Serialize for Expansion
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Expansion
Auto Trait Implementations§
impl Freeze for Expansion
impl RefUnwindSafe for Expansion
impl Send for Expansion
impl Sync for Expansion
impl Unpin for Expansion
impl UnsafeUnpin for Expansion
impl UnwindSafe for Expansion
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.