pub struct ChannelsGuardBuilder { /* private fields */ }Expand description
Builder for creating a ChannelsGuard with custom configuration.
§Examples
use channels_console::{ChannelsGuardBuilder, Format};
let _guard = ChannelsGuardBuilder::new()
.format(Format::JsonPretty)
.build();
// Statistics will be printed as pretty JSON when _guard is droppedImplementations§
Source§impl ChannelsGuardBuilder
impl ChannelsGuardBuilder
Sourcepub fn format(self, format: Format) -> Self
pub fn format(self, format: Format) -> Self
Set the output format for statistics.
§Examples
use channels_console::{ChannelsGuardBuilder, Format};
let _guard = ChannelsGuardBuilder::new()
.format(Format::Json)
.build();Sourcepub fn build(self) -> ChannelsGuard
pub fn build(self) -> ChannelsGuard
Build and return the ChannelsGuard. Statistics will be printed when the guard is dropped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChannelsGuardBuilder
impl RefUnwindSafe for ChannelsGuardBuilder
impl Send for ChannelsGuardBuilder
impl Sync for ChannelsGuardBuilder
impl Unpin for ChannelsGuardBuilder
impl UnwindSafe for ChannelsGuardBuilder
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