diff --git a/delog/all.html b/delog/all.html index fb57570..94bb171 100644 --- a/delog/all.html +++ b/delog/all.html @@ -1 +1 @@ -
#[repr(usize)]pub enum Level {
+Level in delog - Rust #[repr(usize)]pub enum Level {
Error = 1,
Warn = 2,
Info = 3,
@@ -19,11 +19,11 @@
Designates lower priority information.
§Trace = 5
The “trace” level.
Designates very low priority, often extremely verbose, information.
-Converts the Level to the equivalent LevelFilter.
Converts the Level to the equivalent LevelFilter.
Returns the string representation of the Level.
This returns the same string as the fmt::Display implementation.
Iterate through all supported logging levels.
The order of iteration is from more severe to less severe log messages.
use log::Level;
@@ -32,25 +32,47 @@
assert_eq!(Some(Level::Error), levels.next());
assert_eq!(Some(Level::Trace), levels.last());Get the next-highest Level from this one.
If the current Level is at the highest level, the returned Level will be the same as the
+current one.
use log::Level;
+
+let level = Level::Info;
+
+assert_eq!(Level::Debug, level.increment_severity());
+assert_eq!(Level::Trace, level.increment_severity().increment_severity());
+assert_eq!(Level::Trace, level.increment_severity().increment_severity().increment_severity()); // max levelGet the next-lowest Level from this one.
If the current Level is at the lowest level, the returned Level will be the same as the
+current one.
use log::Level;
+
+let level = Level::Info;
+
+assert_eq!(Level::Warn, level.decrement_severity());
+assert_eq!(Level::Error, level.decrement_severity().decrement_severity());
+assert_eq!(Level::Error, level.decrement_severity().decrement_severity().decrement_severity()); // min level#[repr(usize)]pub enum LevelFilter {
+LevelFilter in delog - Rust #[repr(usize)]pub enum LevelFilter {
Off = 0,
Error = 1,
Warn = 2,
@@ -14,12 +14,12 @@ to get and set the maximum log level with max_
§Info = 3
Corresponds to the Info log level.
§Debug = 4
Corresponds to the Debug log level.
§Trace = 5
Corresponds to the Trace log level.
-Returns the most verbose logging level filter.
-Returns the most verbose logging level filter.
+Converts self to the equivalent Level.
Returns None if self is LevelFilter::Off.
Returns the string representation of the LevelFilter.
This returns the same string as the fmt::Display implementation.
Iterate through all supported filtering levels.
+Iterate through all supported filtering levels.
The order of iteration is from less to more verbose filtering.
use log::LevelFilter;
@@ -28,25 +28,48 @@ to get and set the maximum log level with max_
assert_eq!(Some(LevelFilter::Off), levels.next());
assert_eq!(Some(LevelFilter::Trace), levels.last());source. Read mores to return a value of this type. Read moreGet the next-highest LevelFilter from this one.
If the current LevelFilter is at the highest level, the returned LevelFilter will be the
+same as the current one.
use log::LevelFilter;
+
+let level_filter = LevelFilter::Info;
+
+assert_eq!(LevelFilter::Debug, level_filter.increment_severity());
+assert_eq!(LevelFilter::Trace, level_filter.increment_severity().increment_severity());
+assert_eq!(LevelFilter::Trace, level_filter.increment_severity().increment_severity().increment_severity()); // max levelGet the next-lowest LevelFilter from this one.
If the current LevelFilter is at the lowest level, the returned LevelFilter will be the
+same as the current one.
use log::LevelFilter;
+
+let level_filter = LevelFilter::Info;
+
+assert_eq!(LevelFilter::Warn, level_filter.decrement_severity());
+assert_eq!(LevelFilter::Error, level_filter.decrement_severity().decrement_severity());
+assert_eq!(LevelFilter::Off, level_filter.decrement_severity().decrement_severity().decrement_severity());
+assert_eq!(LevelFilter::Off, level_filter.decrement_severity().decrement_severity().decrement_severity().decrement_severity()); // min levelsource. Read mores to return a value of this type. Read morepub unsafe fn dequeue(delogger: impl Delogger, buf: &mut [u8]) -> &strThe core “read from circular buffer” method. Marked unsafe to discourage use!
+pub unsafe fn dequeue(delogger: impl Delogger, buf: &mut [u8]) -> &strThe core “read from circular buffer” method. Marked unsafe to discourage use!
Unfortunately exposed for all to see, as the delog! macro needs access to it to
implement the logger at call site. Hence marked as unsafe.
pub unsafe fn enqueue(delogger: impl Delogger, record: &Record<'_>)The core “write to circular buffer” method. Marked unsafe to discourage use!
+pub unsafe fn enqueue(delogger: impl Delogger, record: &Record<'_>)The core “write to circular buffer” method. Marked unsafe to discourage use!
Unfortunately exposed for all to see, as the delog! macro needs access to it to
implement the logger at call site. Hence marked as unsafe.
pub fn logger() -> &'static mut Option<&'static dyn TryLogWithStatistics>Returns a reference to the logger (as TryLogWithStatistics implementation)
pub fn logger() -> &'static mut Option<&'static dyn TryLogWithStatistics>Returns a reference to the logger (as TryLogWithStatistics implementation)
pub unsafe fn try_enqueue(
+try_enqueue in delog - Rust pub unsafe fn try_enqueue(
delogger: impl Delogger,
record: &Record<'_>,
) -> Result<(), ()>
Expand description
The fallible “write to circular buffer” method. Marked unsafe to discourage use!
diff --git a/delog/hex/fn.HexStr.html b/delog/hex/fn.HexStr.html
index fd21309..08a5321 100644
--- a/delog/hex/fn.HexStr.html
+++ b/delog/hex/fn.HexStr.html
@@ -1,4 +1,4 @@
-HexStr in delog::hex - Rust pub fn HexStr<T: ?Sized, U: Unsigned, S: Separator>(
+HexStr in delog::hex - Rust pub fn HexStr<T: ?Sized, U: Unsigned, S: Separator>(
value: &T,
) -> HexStr<'_, T, U, S>
Expand description
Explicitly construct a newtype to format with.
The first generic parameter specifies the block size in bytes, the second parameter
diff --git a/delog/hex/index.html b/delog/hex/index.html
index c32453b..f5f1ffd 100644
--- a/delog/hex/index.html
+++ b/delog/hex/index.html
@@ -1,4 +1,4 @@
-
delog::hex - Rust Expand description
Convenient Display and other traits for binary data.
+delog::hex - Rust Expand description
Convenient Display and other traits for binary data.
Standard Rust uses the fmt::UpperHex and LowerHex traits to implement hexadecimal
representations for use in format strings. For instance,
format_args!("{:02X?}", &[7, 0xA1, 0xFF]) produces the string "[07, A1, FF]".
diff --git a/delog/hex/struct.HexStr.html b/delog/hex/struct.HexStr.html
index 6758e60..f5b1069 100644
--- a/delog/hex/struct.HexStr.html
+++ b/delog/hex/struct.HexStr.html
@@ -1,4 +1,4 @@
-HexStr in delog::hex - Rust pub struct HexStr<'a, T: ?Sized, U, S>where
+HexStr in delog::hex - Rust pub struct HexStr<'a, T: ?Sized, U, S>{
pub value: &'a T,
diff --git a/delog/hex/struct.U1.html b/delog/hex/struct.U1.html
index 37662ff..d40676b 100644
--- a/delog/hex/struct.U1.html
+++ b/delog/hex/struct.U1.html
@@ -1,4 +1,4 @@
-U1 in delog::hex - Rust pub struct U1;
Expand description
A type that represents the integer 1.
+U1 in delog::hex - Rust pub struct U1;
Expand description
A type that represents the integer 1.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for U1
§impl RefUnwindSafe for U1
§impl Send for U1
§impl Sync for U1
§impl Unpin for U1
§impl UnwindSafe for U1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
diff --git a/delog/hex/trait.Separator.html b/delog/hex/trait.Separator.html
index 3403194..970a1a8 100644
--- a/delog/hex/trait.Separator.html
+++ b/delog/hex/trait.Separator.html
@@ -1,4 +1,4 @@
-Separator in delog::hex - Rust pub trait Separator {
+Separator in delog::hex - Rust pub trait Separator {
const SEPARATOR: &'static str;
}
Expand description
A type that specifies a separator str.
Required Associated Constants§
Sourceconst SEPARATOR: &'static str
The actual separator str.
diff --git a/delog/hex/trait.Unsigned.html b/delog/hex/trait.Unsigned.html
index e04d67b..5d116da 100644
--- a/delog/hex/trait.Unsigned.html
+++ b/delog/hex/trait.Unsigned.html
@@ -1,4 +1,4 @@
-Unsigned in delog::hex - Rust pub trait Unsigned {
+Unsigned in delog::hex - Rust pub trait Unsigned {
const N: usize;
}
Expand description
A type that specifies an unsigned integer.
We use this instead of typenum as the latter currently lacks
diff --git a/delog/index.html b/delog/index.html
index 95c51a0..1ec61dd 100644
--- a/delog/index.html
+++ b/delog/index.html
@@ -1,4 +1,4 @@
-
delog - Rust Expand description
§Compile-time configurable deferred logging (for printf()-debugging aka tracing)
+delog - Rust Expand description
§Compile-time configurable deferred logging (for printf()-debugging aka tracing)
This is an implementation of the log::Log trait, suitable for use
in both embedded and desktop environments.
It has two main goals:
diff --git a/delog/macro.delog.html b/delog/macro.delog.html
index 119288b..fce6872 100644
--- a/delog/macro.delog.html
+++ b/delog/macro.delog.html
@@ -1,4 +1,4 @@
-delog in delog - Rust macro_rules! delog {
+delog in delog - Rust macro_rules! delog {
($logger:ident, $capacity:expr, $render_capacity:expr, $flusher:ty) => { ... };
($logger:ident, $capacity:expr, $flusher:ty) => { ... };
($logger:ident, $capacity:expr, $flusher:ty, renderer: $renderer:ty) => { ... };
diff --git a/delog/macro.generate_macros.html b/delog/macro.generate_macros.html
index ee9103b..bb0f191 100644
--- a/delog/macro.generate_macros.html
+++ b/delog/macro.generate_macros.html
@@ -1,4 +1,4 @@
-generate_macros in delog - Rust macro_rules! generate_macros {
+generate_macros in delog - Rust macro_rules! generate_macros {
() => { ... };
}
Expand description
Generate logging macros that can be gated by library.
Realize that these macros are generated in the namespace of the consuming library, the one
diff --git a/delog/macro.hex_str.html b/delog/macro.hex_str.html
index 90d2266..7966b33 100644
--- a/delog/macro.hex_str.html
+++ b/delog/macro.hex_str.html
@@ -1,4 +1,4 @@
-
hex_str in delog - Rust macro_rules! hex_str {
+hex_str in delog - Rust macro_rules! hex_str {
($array:expr) => { ... };
($array:expr, sep: $separator:expr) => { ... };
($array:expr, $n:tt) => { ... };
diff --git a/delog/macro.hexstr.html b/delog/macro.hexstr.html
index 12e1544..afe3a6a 100644
--- a/delog/macro.hexstr.html
+++ b/delog/macro.hexstr.html
@@ -1,4 +1,4 @@
-hexstr in delog - Rust macro_rules! hexstr {
+hexstr in delog - Rust macro_rules! hexstr {
($array:expr) => { ... };
}
Expand description
More compactly format byte arrays and slices as hexadecimals.
diff --git a/delog/render/fn.default.html b/delog/render/fn.default.html
index bb6be6f..3ec6916 100644
--- a/delog/render/fn.default.html
+++ b/delog/render/fn.default.html
@@ -1,2 +1,2 @@
-default in delog::render - Rust pub fn default() -> &'static DefaultRenderer
Expand description
The default, minimal renderer.
+default in delog::render - Rust pub fn default() -> &'static DefaultRenderer
Expand description
The default, minimal renderer.
\ No newline at end of file
diff --git a/delog/render/fn.render_arguments.html b/delog/render/fn.render_arguments.html
index f4e1d38..23fb656 100644
--- a/delog/render/fn.render_arguments.html
+++ b/delog/render/fn.render_arguments.html
@@ -1,4 +1,4 @@
-render_arguments in delog::render - Rust pub fn render_arguments<'a>(buf: &'a mut [u8], args: Arguments<'_>) -> &'a [u8]
Expand description
For some reason, there seems to be no existing method to easily render
+
render_arguments in delog::render - Rust
\ No newline at end of file
diff --git a/delog/render/fn.render_record.html b/delog/render/fn.render_record.html
index 1844618..57d33c3 100644
--- a/delog/render/fn.render_record.html
+++ b/delog/render/fn.render_record.html
@@ -1,2 +1,2 @@
-render_record in delog::render - Rust pub fn render_record<'a>(buf: &'a mut [u8], record: &Record<'_>) -> &'a [u8]
Expand description
Render record, based on feature flags.
+render_record in delog::render - Rust
\ No newline at end of file
diff --git a/delog/render/index.html b/delog/render/index.html
index 0b81610..e0444ec 100644
--- a/delog/render/index.html
+++ b/delog/render/index.html
@@ -1,3 +1,3 @@
-delog::render - Rust Expand description
The default, minimal renderer, and some helper functions.
+delog::render - Rust Expand description
The default, minimal renderer, and some helper functions.
Structs§
- Default
Renderer - Renders just the
record.args(). - Ripgrep
Renderer - Renders the
record.args(), prefixed by level, target, and file, line if they are some.
Functions§
- default
- The default, minimal renderer.
- render_
arguments - For some reason, there seems to be no existing method to easily render
fmt::Arguments in a pre-allocated byte array.
- render_
record - Render record, based on feature flags.
\ No newline at end of file
diff --git a/delog/render/struct.DefaultRenderer.html b/delog/render/struct.DefaultRenderer.html
index 8174670..8db836f 100644
--- a/delog/render/struct.DefaultRenderer.html
+++ b/delog/render/struct.DefaultRenderer.html
@@ -1,6 +1,6 @@
-DefaultRenderer in delog::render - Rust pub struct DefaultRenderer {}
Expand description
Renders just the record.args().
-Trait Implementations§
Source§impl Clone for DefaultRenderer
Source§fn clone(&self) -> DefaultRenderer
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Renderer for DefaultRenderer
Source§impl Copy for DefaultRenderer
Source§impl Send for DefaultRenderer
Source§impl Sync for DefaultRenderer
Auto Trait Implementations§
§impl Freeze for DefaultRenderer
§impl RefUnwindSafe for DefaultRenderer
§impl Unpin for DefaultRenderer
§impl UnwindSafe for DefaultRenderer
Blanket Implementations§
Source§impl<T> Any for Twhere
+DefaultRenderer in delog::render - Rust pub struct DefaultRenderer {}
Expand description
Renders just the record.args().
+Trait Implementations§
Source§impl Clone for DefaultRenderer
Source§fn clone(&self) -> DefaultRenderer
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Renderer for DefaultRenderer
Source§impl Copy for DefaultRenderer
Source§impl Send for DefaultRenderer
Source§impl Sync for DefaultRenderer
Auto Trait Implementations§
§impl Freeze for DefaultRenderer
§impl RefUnwindSafe for DefaultRenderer
§impl Unpin for DefaultRenderer
§impl UnwindSafe for DefaultRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/delog/render/struct.RipgrepRenderer.html b/delog/render/struct.RipgrepRenderer.html
index 9b6f6e5..c57f40f 100644
--- a/delog/render/struct.RipgrepRenderer.html
+++ b/delog/render/struct.RipgrepRenderer.html
@@ -1,6 +1,6 @@
-RipgrepRenderer in delog::render - Rust pub struct RipgrepRenderer {}
Expand description
Renders the record.args(), prefixed by level, target, and file, line if they are some.
-Trait Implementations§
Source§impl Clone for RipgrepRenderer
Source§fn clone(&self) -> RipgrepRenderer
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Renderer for RipgrepRenderer
Source§impl Copy for RipgrepRenderer
Auto Trait Implementations§
§impl Freeze for RipgrepRenderer
§impl RefUnwindSafe for RipgrepRenderer
§impl Send for RipgrepRenderer
§impl Sync for RipgrepRenderer
§impl Unpin for RipgrepRenderer
§impl UnwindSafe for RipgrepRenderer
Blanket Implementations§
Source§impl<T> Any for Twhere
+RipgrepRenderer in delog::render - Rust pub struct RipgrepRenderer {}
Expand description
Renders the record.args(), prefixed by level, target, and file, line if they are some.
+Trait Implementations§
Source§impl Clone for RipgrepRenderer
Source§fn clone(&self) -> RipgrepRenderer
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Renderer for RipgrepRenderer
Source§impl Copy for RipgrepRenderer
Auto Trait Implementations§
§impl Freeze for RipgrepRenderer
§impl RefUnwindSafe for RipgrepRenderer
§impl Send for RipgrepRenderer
§impl Sync for RipgrepRenderer
§impl Unpin for RipgrepRenderer
§impl UnwindSafe for RipgrepRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/delog/struct.Record.html b/delog/struct.Record.html
index 86bae9a..36ca99b 100644
--- a/delog/struct.Record.html
+++ b/delog/struct.Record.html
@@ -1,4 +1,4 @@
-Record in delog - Rust pub struct Record<'a> { /* private fields */ }
Expand description
The “payload” of a log message.
+Record in delog - Rust pub struct Record<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Record<'a>
Sourcepub fn builder() -> RecordBuilder<'a>
Returns a new builder.
-Sourcepub fn module_path(&self) -> Option<&'a str>
The module path of the message.
-Sourcepub fn module_path_static(&self) -> Option<&'static str>
The module path of the message, if it is a 'static string.
-Sourcepub fn file_static(&self) -> Option<&'static str>
The source file containing the message, if it is a 'static string.
-Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Record<'a>
§impl<'a> RefUnwindSafe for Record<'a>
§impl<'a> !Send for Record<'a>
§impl<'a> !Sync for Record<'a>
§impl<'a> Unpin for Record<'a>
§impl<'a> UnwindSafe for Record<'a>
Blanket Implementations§
Implementations§
Source§impl<'a> Record<'a>
Sourcepub fn builder() -> RecordBuilder<'a>
Returns a new builder.
+Sourcepub fn module_path(&self) -> Option<&'a str>
The module path of the message.
+Sourcepub fn module_path_static(&self) -> Option<&'static str>
The module path of the message, if it is a 'static string.
+Sourcepub fn file_static(&self) -> Option<&'static str>
The source file containing the message, if it is a 'static string.
+Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Record<'a>
§impl<'a> RefUnwindSafe for Record<'a>
§impl<'a> !Send for Record<'a>
§impl<'a> !Sync for Record<'a>
§impl<'a> Unpin for Record<'a>
§impl<'a> UnwindSafe for Record<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/delog/struct.Statistics.html b/delog/struct.Statistics.html
index 7187584..16245b7 100644
--- a/delog/struct.Statistics.html
+++ b/delog/struct.Statistics.html
@@ -1,4 +1,4 @@
-Statistics in delog - Rust pub struct Statistics {
+Statistics in delog - Rust pub struct Statistics {
pub attempts: usize,
pub successes: usize,
pub flushes: usize,
@@ -10,7 +10,7 @@
§flushes: usizeHow often was the flusher called.
§read: usizeHow many bytes were flushed so far.
§written: usizeHow many bytes were logged so far.
-Trait Implementations§
Source§impl Clone for Statistics
Source§fn clone(&self) -> Statistics
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for Statistics
Source§impl Copy for Statistics
Auto Trait Implementations§
§impl Freeze for Statistics
§impl RefUnwindSafe for Statistics
§impl Send for Statistics
§impl Sync for Statistics
§impl Unpin for Statistics
§impl UnwindSafe for Statistics
Blanket Implementations§
Source§impl<T> Any for Twhere
+Trait Implementations§
Source§impl Clone for Statistics
Source§fn clone(&self) -> Statistics
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for Statistics
Source§impl Copy for Statistics
Auto Trait Implementations§
§impl Freeze for Statistics
§impl RefUnwindSafe for Statistics
§impl Send for Statistics
§impl Sync for Statistics
§impl Unpin for Statistics
§impl UnwindSafe for Statistics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/delog/trait.Delogger.html b/delog/trait.Delogger.html
index 11f69c4..21bde76 100644
--- a/delog/trait.Delogger.html
+++ b/delog/trait.Delogger.html
@@ -1,4 +1,4 @@
-Delogger in delog - Rust