Struct argmin_observer_slog::SlogLogger
source · pub struct SlogLogger { /* private fields */ }
Expand description
A logger using the slog
crate as backend.
Implementations§
source§impl SlogLogger
impl SlogLogger
sourcepub fn term() -> Self
pub fn term() -> Self
Log to the terminal.
Will block execution when buffer is full.
§Example
use argmin_observer_slog::SlogLogger;
let terminal_logger = SlogLogger::term();
sourcepub fn term_noblock() -> Self
pub fn term_noblock() -> Self
Log to the terminal without blocking execution.
Messages may be lost in case of buffer overflow.
§Example
use argmin_observer_slog::SlogLogger;
let terminal_logger = SlogLogger::term_noblock();
Trait Implementations§
source§impl Clone for SlogLogger
impl Clone for SlogLogger
source§fn clone(&self) -> SlogLogger
fn clone(&self) -> SlogLogger
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I> Observe<I> for SlogLoggerwhere
I: State,
impl<I> Observe<I> for SlogLoggerwhere
I: State,
source§fn observe_init(&mut self, msg: &str, _state: &I, kv: &KV) -> Result<(), Error>
fn observe_init(&mut self, msg: &str, _state: &I, kv: &KV) -> Result<(), Error>
Log basic information about the optimization after initialization.
Auto Trait Implementations§
impl Freeze for SlogLogger
impl RefUnwindSafe for SlogLogger
impl Send for SlogLogger
impl Sync for SlogLogger
impl Unpin for SlogLogger
impl UnwindSafe for SlogLogger
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.