#[non_exhaustive]pub enum CanonicalizeError {
ReparseFailed {
errors: Vec<String>,
},
DirectiveCountMismatch {
input: usize,
reparsed: usize,
},
}Expand description
Error returned by canonicalize_directives.
Marked #[non_exhaustive] so that adding a future variant
(e.g. a CanonicalizationTimeout for an async path, or a new
guard for a future canonical-form rule) does not become a
SemVer-breaking change. Consumers must use a _ => … arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReparseFailed
The synthesized intermediate failed to re-parse cleanly. Carries the rendered error messages so callers can surface a diagnostic; the source text itself is not retained because it’s an internal intermediate the caller has no control over.
Fields
DirectiveCountMismatch
The synthesized intermediate parsed cleanly but produced a
different directive count than the input. This indicates
the legacy emitter and the new parser disagree on what
constitutes a directive — typically a future
rustledger_core::Directive variant whose legacy text the
CST parser silently swallows as comments / error-recovery
trivia. Without this guard, the call would round-trip to
truncated text with no error returned.
Trait Implementations§
Source§impl Clone for CanonicalizeError
impl Clone for CanonicalizeError
Source§fn clone(&self) -> CanonicalizeError
fn clone(&self) -> CanonicalizeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CanonicalizeError
impl Debug for CanonicalizeError
Source§impl Display for CanonicalizeError
impl Display for CanonicalizeError
Source§impl Error for CanonicalizeError
impl Error for CanonicalizeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CanonicalizeError
impl RefUnwindSafe for CanonicalizeError
impl Send for CanonicalizeError
impl Sync for CanonicalizeError
impl Unpin for CanonicalizeError
impl UnsafeUnpin for CanonicalizeError
impl UnwindSafe for CanonicalizeError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.