Struct log_wrappers::test_util::SyncLoggerBuffer [−][src]
A buffer which can be served as a logging destination while being able to access its content.
Implementations
impl SyncLoggerBuffer
[src][−]
pub fn new() -> SyncLoggerBufferⓘNotable traits for SyncLoggerBuffer
impl Write for SyncLoggerBuffer
[src][−]
Notable traits for SyncLoggerBuffer
impl Write for SyncLoggerBuffer
Creates a new instance.
pub fn build_logger(&self) -> Logger
[src][−]
Builds a slog::Logger
over this buffer which uses compact format and always output TIME
in the time field.
fn lock(&self) -> MutexGuard<'_, Vec<u8>>
[src]
pub fn as_string(&self) -> String
[src][−]
Clones the buffer and creates a String.
Panics if the buffer is not a valid UTF-8 string.
pub fn clear(&self)
[src][−]
Clears the buffer.
Trait Implementations
impl Clone for SyncLoggerBuffer
[src][+]
impl Default for SyncLoggerBuffer
[src][+]
impl Write for SyncLoggerBuffer
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for SyncLoggerBuffer
impl Send for SyncLoggerBuffer
impl Sync for SyncLoggerBuffer
impl Unpin for SyncLoggerBuffer
impl UnwindSafe for SyncLoggerBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<W> WriteBytesExt for W where
W: Write + ?Sized,
[src][+]
W: Write + ?Sized,