pub enum ExpandError {
UnknownFunction(Ident),
UnknownParam(Ident, Ident),
UnknownConstructor(Ident),
NoConstructor {
func: Ident,
param: Ident,
target: String,
},
TargetMismatch {
ctor: String,
produces: String,
expected: String,
},
UnsupportedOptional {
func: Ident,
param: Ident,
reason: &'static str,
},
ConstructOnAccessor {
func: Ident,
},
ParamTypeMismatch {
func: Ident,
param: Ident,
declared: String,
actual: String,
},
InputCycle {
ty: String,
},
UnsupportedRecursive {
func: Ident,
reason: &'static str,
},
InvalidDeclarations {
entries: Vec<ExpandDeclError>,
},
}Expand description
Errors surfaced while resolving Expansions.
Variants§
UnknownFunction(Ident)
UnknownParam(Ident, Ident)
UnknownConstructor(Ident)
NoConstructor
TargetMismatch
UnsupportedOptional
ConstructOnAccessor
An explicit per-fn input flatten targeted a read accessor — accessors are never parameter-composed.
ParamTypeMismatch
A per-fn .expand_param(name, expand_param!(T)) decl whose T does
not match the named parameter’s peeled type.
InputCycle
Recursive input reached a type already on the build chain (A → … → A).
UnsupportedRecursive
A recursive-input shape that is declared-but-not-yet-supported (recursion
under a selector-dispatched variant, or on an Option<…> parameter).
InvalidDeclarations
Structurally invalid declaration records — empty variant lists or
duplicate targets. All offenders are collected before failing
(mirrors ScanError::DeclaredNotFound).
Fields
§
entries: Vec<ExpandDeclError>Trait Implementations§
Source§impl Debug for ExpandError
impl Debug for ExpandError
Source§impl Display for ExpandError
impl Display for ExpandError
Source§impl Error for ExpandError
impl Error for ExpandError
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 From<ExpandError> for WriteRustError
impl From<ExpandError> for WriteRustError
Source§fn from(e: ExpandError) -> Self
fn from(e: ExpandError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Send for ExpandError
impl !Sync for ExpandError
impl Freeze for ExpandError
impl RefUnwindSafe for ExpandError
impl Unpin for ExpandError
impl UnsafeUnpin for ExpandError
impl UnwindSafe for ExpandError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more