pub struct MyLib { /* private fields */ }
Expand description
MyLib main struct
Implementations§
Source§impl MyLib
impl MyLib
Sourcepub fn init<L: Into<Option<Logger>>>(logger: L) -> Self
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
Sourcepub fn do_the_thing(&self)
pub fn do_the_thing(&self)
Do something
Auto Trait Implementations§
impl Freeze for MyLib
impl RefUnwindSafe for MyLib
impl Send for MyLib
impl Sync for MyLib
impl Unpin for MyLib
impl UnwindSafe for MyLib
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more