Struct slog_example_lib::MyLib [−][src]
pub struct MyLib { /* fields omitted */ }
MyLib main struct
Methods
impl MyLib
[src]
impl MyLib
pub fn init<L: Into<Option<Logger>>>(logger: L) -> Self
[src]
pub fn init<L: Into<Option<Logger>>>(logger: L) -> Self
Initialize MyLib
, possibly providing custom logger
logger = None
, will make MyLib
log to the slog-stdlog
drain. This make the library effectively work the same
as it was just using log
instead of slog
.
Into
trick allows passing Logger
directly, without the Some
part.
See http://xion.io/post/code/rust-optional-args.html
pub fn do_the_thing(&self)
[src]
pub fn do_the_thing(&self)
Do something