Macro bigerror::from_report
source · macro_rules! from_report { ({ impl From<$from:path as ToReport<_> $(as $context:path)*> $($tail:tt)* }) => { ... }; ({ impl From<$from:path as ToReport<_>> $($tail:tt)* }) => { ... }; ({ impl From<Report<$from:path>> $($tail:tt)* }) => { ... }; ({ impl From<$from:path $(as $context:path)*> $($tail:tt)* }) => { ... }; ( @t[$($t:path $(as $t_context:path)*,)*] @report_t[$($report_t:path)*] @to_report[$($to_report:path $(as $to_context:path)*,)*] impl From<Report<$from:path>> $($tail:tt)*) => { ... }; ( @t[$($t:path $(as $t_context:path)*,)*] @report_t[$($report_t:path)*] @to_report[$($to_report:path $(as $to_context:path)*,)*] impl From<$from:path as ToReport<_> $(as $context:path)*> $($tail:tt)*) => { ... }; ( @t[$($t:path $(as $t_context:path)*,)*] @report_t[$($report_t:path)*] @to_report[$($to_report:path $(as $to_context:path)*,)*] impl From<$from:path as ToReport<_>> $($tail:tt)*) => { ... }; ( @t[$($t:path $(as $t_context:path)*,)*] @report_t[$($report_t:path)*] @to_report[$($to_report:path $(as $to_context:path)*,)*] impl From<$from:path $(as $context:path)*> $($tail:tt)*) => { ... }; ( @t[$($t:path $(as $t_context:path)*,)*] @report_t[$($report_t:path)*] @to_report[$($to_report:path $(as $to_context:path)*,)*] for $for:ident::$variant:ident($inner:path)) => { ... }; (impl From<Report<$from:path>> for $for:ident::$variant:ident) => { ... }; (impl From<$from:path as ToReport<$context:path>> for $for:ident::$variant:ident) => { ... }; (impl From<$from:path $(as $context:path)*> for $for:ident::$variant:ident) => { ... }; }
Expand description
USAGE:
impl From<SomeError as ToReport<_> $(as $context:path)*> for OurError::Report(OurReportError)
- Implements
From<E> where E: ToReport<_>for errors that implementToReport
- impl From<Report
>> for OurError::Report(TransactionError)
- Implements
From<Report<SomeError>>forReport<OurReportError>
impl From<SomeError $(as $context:path)*> for OurError::Report(TransactionError)
- Implements
From<SomeError>forReport<OurReportError> - Used to cast an error to
OurReportError, can useasto do multiple::fromconversion:impl From<SomeError as MiddleError>does a concrete implementation of theimplbelow whereEisSomeError:impl From<E> for OurError where E: Into<MiddleError> {}