for code readability purpose I had to separate out code into two different modules.Common errortype
which is used by multiple functions in module_a
and few in module_b
is now part of module_a
(Since only few functions uses this errortype
in module_b
i don't want to create a new errortype in module_b
instead i want to use this existing errortype from module_a
).And this errortype
derives snafu
due to which I can't use this errortype
in module b
now . I get this below error if i try to do so
error[E0425]: cannot find value `CreateFooSnafu` in this scope
--> mod_b.rs:
|
| .context(CreateFooSnafu)?;
| ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
note: unit struct `crate::mod_a::CreateFooSnafu` exists but is inaccessible
--> src/mod_b
|
| #[derive(Debug, Snafu)]
| ^^^^^ not accessible
How do i solve this