Module adviseable

Module adviseable 

Source
Expand description

errors with compatibility advice

Suitable for local glob import.

§Non-local errors from syn

syn automatically produces “unexpected token” errors, if not all of the input is consumed, somewhere.

Empirically: these errors are squirreled away somewhere, and surface on return from one of the top-level syn parse functions (the ones that provide a ParseStream).

If the top-level function would return Ok, the unexpected tokens error appears instead. But if there’s going to be an error anyway, the unexpected tokens error is discarded.

Re-exports§

pub use AdviseableInnerResult::ErrNeedsNoAdvice as ErrNNA;
pub use AdviseableInnerResult::Ok as AOk;

Macros§

parse_unadvised 🔒
Within parse_adviseable, handle errors without giving advice

Enums§

AdviseableInnerResult
Typically found as syn::Result<AdvisedResult<T>>

Traits§

ParseAdviseable
Types that can be parsed, but might need compat advice

Functions§

advise_incompatibility
Add a warning about derive-deftly version incompatibility
adviseable_parse2
Parses T, and produces advice if necessary (principal entrypoint)
adviseable_parse2_call
Parses with a callback, and produces advice if necessary

Type Aliases§

AdviseableResult
A Result whose error might, or might not, need compat advice