pub enum SnippetError {
DuplicateIndex(u16),
Nesting,
Malformed(&'static str),
}Expand description
Why a snippet body failed to parse. Real spec.rs snippets never trigger
these (its own suite pins validity); the insertion path treats a failure as
“insert the raw body verbatim” behind a debug_assert, so this stays a
clean Result here.
Variants§
DuplicateIndex(u16)
The same placeholder index appeared twice (mirrored placeholders are
unsupported). 0 reports the final stop ($0).
Nesting
A placeholder appeared inside a default (defaults are literal text).
Malformed(&'static str)
A malformed placeholder token.
Trait Implementations§
Source§impl Clone for SnippetError
impl Clone for SnippetError
Source§fn clone(&self) -> SnippetError
fn clone(&self) -> SnippetError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnippetError
impl Debug for SnippetError
Source§impl Display for SnippetError
impl Display for SnippetError
impl Eq for SnippetError
Source§impl Error for SnippetError
impl Error for SnippetError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SnippetError
impl PartialEq for SnippetError
impl StructuralPartialEq for SnippetError
Auto Trait Implementations§
impl Freeze for SnippetError
impl RefUnwindSafe for SnippetError
impl Send for SnippetError
impl Sync for SnippetError
impl Unpin for SnippetError
impl UnsafeUnpin for SnippetError
impl UnwindSafe for SnippetError
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<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
Compare self to
key and return true if they are equal.