These are convenient in each record/block mapping implementation, but they're also constraining: because they return BlockMapError as their error type, downstream types need to either accept that type (e.g. with thiserror's #[from]) or mangle it into something more local and context sensitive. This in turn makes it harder to make the mapping traits more flexible in terms of error handling.
llvm_mapper::unroll::UnrolledBlock
currently has a bunch of APIs with signatures that look roughly like this:These are convenient in each record/block mapping implementation, but they're also constraining: because they return
BlockMapError
as their error type, downstream types need to either accept that type (e.g. withthiserror
's#[from]
) or mangle it into something more local and context sensitive. This in turn makes it harder to make the mapping traits more flexible in terms of error handling.