I can call fern::Dispatch::into_shared, but when I try to return it from a function:
fn setup_logger(output: fern::Output) -> fern::SharedDispatch {
let shared = fern::Dispatch::new()
.into_shared();
return shared;
}
I get an error.
error[E0412]: cannot find type `SharedDispatch` in crate `fern`
--> runner\src\main.rs:279:49
|
279 | fn setup_logger(output: fern::Output) -> fern::SharedDispatch {
| ^^^^^^^^^^^^^^ not found in `fern`
For more information about this error, try `rustc --explain E0412`.
The type cannot be clicked on in the docs as well:
https://docs.rs/fern/latest/fern/struct.Dispatch.html#method.into_shared
I guess one has forgotten to export the type?
|
pub use crate::{ |
|
builders::{Dispatch, Output, Panic}, |
|
errors::InitError, |
|
log_impl::FormatCallback, |
|
}; |
I can call
fern::Dispatch::into_shared, but when I try to return it from a function:I get an error.
The type cannot be clicked on in the docs as well:
https://docs.rs/fern/latest/fern/struct.Dispatch.html#method.into_shared
I guess one has forgotten to export the type?
fern/src/lib.rs
Lines 266 to 270 in 4f45ef9