From ac5e5c012282f61a2e11d27ea6cec130568a8297 Mon Sep 17 00:00:00 2001
From: sosthene-nitrokey Designates lower priority information. The “trace” level. Designates very low priority, often extremely verbose, information. Converts the Converts the Returns the string representation of the This returns the same string as the Iterate through all supported logging levels. The order of iteration is from more severe to less severe log messages.List of all items
Structs
Enums
Traits
Macros
Functions
List of all items
Structs
Enums
Traits
Macros
Functions
#[repr(usize)]pub enum Level {
+#[repr(usize)]pub enum Level {
Error = 1,
Warn = 2,
Info = 3,
@@ -19,11 +19,11 @@
Trace = 5
Implementations§
impl Level
pub fn to_level_filter(&self) -> LevelFilter
Level to the equivalent LevelFilter.Implementations§
impl Level
pub fn to_level_filter(&self) -> LevelFilter
Level to the equivalent LevelFilter.pub fn as_str(&self) -> &'static str
Level.fmt::Display implementation.pub fn iter() -> impl Iterator<Item = Level>
§Examples
-use log::Level;
@@ -32,33 +32,33 @@
assert_eq!(Some(Level::Error), levels.next());
assert_eq!(Some(Level::Trace), levels.last());Trait Implementations§
impl Ord for Level
impl PartialEq<Level> for LevelFilter
impl PartialEq<LevelFilter> for Level
impl PartialOrd<Level> for LevelFilter
impl PartialOrd<LevelFilter> for Level
impl PartialOrd for Level
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
Blanket Implementations§
impl<T> BorrowMut<T> for T
where
- T: ?Sized,fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreimpl<T> CloneToUninit for T
where
- T: Clone,unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
impl Ord for Level
impl PartialEq<Level> for LevelFilter
impl PartialEq<LevelFilter> for Level
impl PartialOrd<Level> for LevelFilter
impl PartialOrd<LevelFilter> for Level
impl PartialOrd for Level
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
Blanket Implementations§
impl<T> BorrowMut<T> for T
where
+ T: ?Sized,fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreimpl<T> CloneToUninit for T
where
+ T: Clone,From<T> for U chooses to do.
#[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,33 +28,33 @@ 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 moreclone_to_uninit)source. Read mores to return a value of this type. Read moreFrom<T> for U chooses to do.
+pub 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!
+) -> Result<(), ()>Expand description
The fallible “write to circular buffer” method. Marked unsafe to discourage use!
§Safety
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.
diff --git a/delog/hex/fn.HexStr.html b/delog/hex/fn.HexStr.html
index f95a496..84eb0a6 100644
--- a/delog/hex/fn.HexStr.html
+++ b/delog/hex/fn.HexStr.html
@@ -1,5 +1,5 @@
-HexStr in delog::hex - Rust pub fn HexStr<T: ?Sized, U: Unsigned, S: Separator>(
- value: &T,
+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
the separator string.
diff --git a/delog/hex/index.html b/delog/hex/index.html
index d562d49..42f6b9b 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 89e18db..c2f0b59 100644
--- a/delog/hex/struct.HexStr.html
+++ b/delog/hex/struct.HexStr.html
@@ -1,49 +1,49 @@
-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,
+ pub value: &'a T,
/* private fields */
}
Expand description
Zero-sized wrapper newtype, allowing grouping bytes in blocks of N hexadecimals
during formatting.
Use the method with the same name to construct this from your byte array or slice,
or preferrably the hex_str! or hexstr! macro.
-Fields§
§value: &'a TThe value to be formatted.
-Trait Implementations§
Fields§
§value: &'a TThe value to be formatted.
+Trait Implementations§
Auto Trait Implementations§
§impl<'a, T, U, S> Freeze for HexStr<'a, T, U, S>where
- T: ?Sized,
§impl<'a, T, U, S> RefUnwindSafe for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Send for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Sync for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Unpin for HexStr<'a, T, U, S>
§impl<'a, T, U, S> UnwindSafe for HexStr<'a, T, U, S>
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, U> Into<U> for Twhere
- U: From<T>,
Auto Trait Implementations§
§impl<'a, T, U, S> Freeze for HexStr<'a, T, U, S>where
+ T: ?Sized,
§impl<'a, T, U, S> RefUnwindSafe for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Send for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Sync for HexStr<'a, T, U, S>
§impl<'a, T, U, S> Unpin for HexStr<'a, T, U, S>
§impl<'a, T, U, S> UnwindSafe for HexStr<'a, T, U, S>
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 more
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/hex/struct.U1.html b/delog/hex/struct.U1.html
index 22c0acc..4c9dbdd 100644
--- a/delog/hex/struct.U1.html
+++ b/delog/hex/struct.U1.html
@@ -1,12 +1,12 @@
-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
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self).
+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
+ T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/hex/trait.Separator.html b/delog/hex/trait.Separator.html
index ffa8e59..b1584ed 100644
--- a/delog/hex/trait.Separator.html
+++ b/delog/hex/trait.Separator.html
@@ -1,5 +1,5 @@
-Separator in delog::hex - Rust pub trait Separator {
- const SEPARATOR: &'static str;
+Separator in delog::hex - Rust
\ No newline at end of file
+
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
diff --git a/delog/hex/trait.Unsigned.html b/delog/hex/trait.Unsigned.html
index a55a1e6..88572cd 100644
--- a/delog/hex/trait.Unsigned.html
+++ b/delog/hex/trait.Unsigned.html
@@ -1,7 +1,7 @@
-Unsigned in delog::hex - Rust pub trait Unsigned {
- const N: usize;
+Unsigned in delog::hex - Rust
\ No newline at end of file
+
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
diff --git a/delog/index.html b/delog/index.html
index e1dea2f..5bda8aa 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 5538022..df86b39 100644
--- a/delog/macro.delog.html
+++ b/delog/macro.delog.html
@@ -1,9 +1,9 @@
-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) => { ... };
- ($logger:ident, $capacity:expr, $render_capacity:expr, $flusher:ty, renderer: $renderer:ty) => { ... };
-}
Expand description
Generate a deferred logger with specified capacity and flushing mechanism.
+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) => { ... };
+ ($logger:ident, $capacity:expr, $render_capacity:expr, $flusher:ty, renderer: $renderer:ty) => { ... };
+}
Expand description
Generate a deferred logger with specified capacity and flushing mechanism.
Note that only the final “runner” generates, initializes and flushes such a deferred logger.
Libraries simply make calls to log::log!, or its drop-in replacement delog::log!,
and/or its extension delog::log_now!, and/or its alternatives delog::try_log! and delog::try_log_now,
diff --git a/delog/macro.generate_macros.html b/delog/macro.generate_macros.html
index 519188e..959d5ef 100644
--- a/delog/macro.generate_macros.html
+++ b/delog/macro.generate_macros.html
@@ -1,6 +1,6 @@
-
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.
+}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
that actally later makes calls to local_warn! etc.
To see this in action, compile documentation using cargo doc --features example, or inspect
diff --git a/delog/macro.hex_str.html b/delog/macro.hex_str.html
index 4dc94a3..703d096 100644
--- a/delog/macro.hex_str.html
+++ b/delog/macro.hex_str.html
@@ -1,9 +1,9 @@
-
hex_str in delog - Rust macro_rules! hex_str {
- ($array:expr) => { ... };
- ($array:expr, sep: $separator:expr) => { ... };
- ($array:expr, $n:tt) => { ... };
- ($array:expr, $n:tt, sep: $separator:expr) => { ... };
-}
Expand description
Compactly format byte arrays and slices as hexadecimals.
+hex_str in delog - Rust macro_rules! hex_str {
+ ($array:expr) => { ... };
+ ($array:expr, sep: $separator:expr) => { ... };
+ ($array:expr, $n:tt) => { ... };
+ ($array:expr, $n:tt, sep: $separator:expr) => { ... };
+}
Expand description
Compactly format byte arrays and slices as hexadecimals.
The second parameter refers to the number of bytes in a block (separated by spaces).
use delog::hex_str;
diff --git a/delog/macro.hexstr.html b/delog/macro.hexstr.html
index b6a9d8e..8f68b49 100644
--- a/delog/macro.hexstr.html
+++ b/delog/macro.hexstr.html
@@ -1,6 +1,6 @@
-hexstr in delog - Rust macro_rules! hexstr {
- ($array:expr) => { ... };
-}
Expand description
More compactly format byte arrays and slices as hexadecimals.
+hexstr in delog - Rust macro_rules! hexstr {
+ ($array:expr) => { ... };
+}
Expand description
More compactly format byte arrays and slices as hexadecimals.
use delog::hexstr;
let four_bytes = &[7u8, 0xA1, 255, 0xC7];
diff --git a/delog/render/fn.default.html b/delog/render/fn.default.html
index 1633318..0da6e1e 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 143daae..4b2de86 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 d5eb7b1..78489d4 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 3acf0b6..4d87d63 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§
- Renders just the
record.args(). - Renders the
record.args(), prefixed by level, target, and file, line if they are some.
Functions§
- The default, minimal renderer.
- For some reason, there seems to be no existing method to easily render
fmt::Arguments in a pre-allocated byte array.
- 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 d092eba..98ee483 100644
--- a/delog/render/struct.DefaultRenderer.html
+++ b/delog/render/struct.DefaultRenderer.html
@@ -1,14 +1,14 @@
-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 copy 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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self).
+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 copy 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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/render/struct.RipgrepRenderer.html b/delog/render/struct.RipgrepRenderer.html
index 3e856b0..5ec6950 100644
--- a/delog/render/struct.RipgrepRenderer.html
+++ b/delog/render/struct.RipgrepRenderer.html
@@ -1,14 +1,14 @@
-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 copy 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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Calls U::from(self).
+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 copy 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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/struct.Record.html b/delog/struct.Record.html
index 4064a4c..de0dee0 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§
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/struct.Statistics.html b/delog/struct.Statistics.html
index 157d896..4d757c2 100644
--- a/delog/struct.Statistics.html
+++ b/delog/struct.Statistics.html
@@ -1,24 +1,24 @@
-Statistics in delog - Rust pub struct Statistics {
- pub attempts: usize,
- pub successes: usize,
- pub flushes: usize,
- pub read: usize,
- pub written: usize,
+Statistics in delog - Rust pub struct Statistics {
+ pub attempts: usize,
+ pub successes: usize,
+ pub flushes: usize,
+ pub read: usize,
+ pub written: usize,
}
Expand description
Statistics on logger usage.
-Fields§
§attempts: usizeHow often was one of the logging macros called.
-§successes: usizeHow often was one of the logging macros called without early exit (e.g., buffer not full)
-§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 copy 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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
Fields§
§attempts: usizeHow often was one of the logging macros called.
+§successes: usizeHow often was one of the logging macros called without early exit (e.g., buffer not full)
+§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 copy 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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/delog/trait.Delogger.html b/delog/trait.Delogger.html
index ebd04ce..7a7d4a8 100644
--- a/delog/trait.Delogger.html
+++ b/delog/trait.Delogger.html
@@ -1,24 +1,24 @@
-Delogger in delog - Rust pub unsafe trait Delogger:
+Delogger in delog - Rust pub unsafe trait Delogger:
Log
+ TryLog
- + State<&'static AtomicUsize> {
+ + State<&'static AtomicUsize> {
// Required methods
- fn buffer(&self) -> &'static mut [u8];
- fn claimed(&self) -> &'static AtomicUsize;
- fn flush(&self, logs: &str);
- fn render(&self, record: &Record<'_>) -> &'static [u8];
+ fn buffer(&self) -> &'static mut [u8];
+ fn claimed(&self) -> &'static AtomicUsize;
+ fn flush(&self, logs: &str);
+ fn render(&self, record: &Record<'_>) -> &'static [u8];
// Provided method
- fn capacity(&self) -> usize { ... }
+ fn capacity(&self) -> usize { ... }
}
Expand description
Semi-abstract characterization of the deferred loggers that the delog! macro produces.
§Safety
This trait is markes “unsafe” to signal that users should never (need to) “write their own”,
but always go through the delog! macro.
The user has access to the global logger via delog::logger(), but only as TryLog/Log
implementation, not with this direct access to implementation details.
-Required Methods§
sourcefn claimed(&self) -> &'static AtomicUsize
How many characters were claimed so far.
-Provided Methods§
Required Methods§
Sourcefn claimed(&self) -> &'static AtomicUsize
How many characters were claimed so far.
+Provided Methods§
Implementors§
\ No newline at end of file
diff --git a/delog/trait.Flusher.html b/delog/trait.Flusher.html
index 9578757..26638b0 100644
--- a/delog/trait.Flusher.html
+++ b/delog/trait.Flusher.html
@@ -1,9 +1,9 @@
-Flusher in delog - Rust pub trait Flusher: Debug + Send {
+Flusher in delog - Rust pub trait Flusher: Debug + Send {
// Required method
- fn flush(&self, logs: &str);
+ fn flush(&self, logs: &str);
}
Expand description
A way to pass on logs, user supplied.
In embedded, this is intended to pend an interrupt
to send the logs off via (USB) serial, semihosting, or similar.
On PC, typical implemenation will just println! or eprintln!
-Required Methods§
sourcefn flush(&self, logs: &str)
Implementor must handle passed log &str in some hopefully useful way.
+Required Methods§
Implementors§
\ No newline at end of file
diff --git a/delog/trait.Renderer.html b/delog/trait.Renderer.html
index da98ec8..d3d36df 100644
--- a/delog/trait.Renderer.html
+++ b/delog/trait.Renderer.html
@@ -1,7 +1,7 @@
-Renderer in delog - Rust pub trait Renderer: Send + Sync {
+Renderer in delog - Rust pub trait Renderer: Send + Sync {
// Required method
- fn render<'a>(&self, buf: &'a mut [u8], record: &Record<'_>) -> &'a [u8];
+ fn render<'a>(&self, buf: &'a mut [u8], record: &Record<'_>) -> &'a [u8];
}
Expand description
A way to format logs, user supplied.
-Required Methods§
\ No newline at end of file
+
Implementors§
Source§impl Renderer for DefaultRenderer
Source§impl Renderer for RipgrepRenderer
\ No newline at end of file
diff --git a/delog/trait.State.html b/delog/trait.State.html
index 5eb3492..6cae831 100644
--- a/delog/trait.State.html
+++ b/delog/trait.State.html
@@ -1,4 +1,4 @@
-State in delog - Rust pub trait State<T> {
+State in delog - Rust pub trait State<T> {
// Required methods
fn attempts(&self) -> T;
fn successes(&self) -> T;
@@ -6,9 +6,9 @@
fn read(&self) -> T;
fn written(&self) -> T;
}
Expand description
Trait for either state or statistics of loggers.
-Required Methods§
sourcefn successes(&self) -> T
How often was one of the logging macros called without early exit (e.g., buffer not full)
-Required Methods§
Implementors§
\ No newline at end of file
diff --git a/delog/trait.TryLog.html b/delog/trait.TryLog.html
index b6b159f..e3e5ba7 100644
--- a/delog/trait.TryLog.html
+++ b/delog/trait.TryLog.html
@@ -1,11 +1,11 @@
-TryLog in delog - Rust pub trait TryLog: Log {
+TryLog in delog - Rust pub trait TryLog: Log {
// Required method
- fn try_log(&self, _: &Record<'_>) -> Result<(), ()>;
+ fn try_log(&self, _: &Record<'_>) -> Result<(), ()>;
}
Expand description
Fallible, panic-free version of the log::Log trait.
The intention is actually that implementors of this trait also
implement log::Log in a panic-free fashion, and simply drop logs
that can’t be logged. Because, if the user can handle the error, they
would be using the fallible macros, and if not, they most likely do not
want to crash.
-Required Methods§
sourcefn try_log(&self, _: &Record<'_>) -> Result<(), ()>
Fallible logging call (fails when buffer is full)
+Required Methods§
Implementors§
\ No newline at end of file
diff --git a/delog/trait.TryLogWithStatistics.html b/delog/trait.TryLogWithStatistics.html
index 776be91..5dfd7a5 100644
--- a/delog/trait.TryLogWithStatistics.html
+++ b/delog/trait.TryLogWithStatistics.html
@@ -1,6 +1,6 @@
-TryLogWithStatistics in delog - Rust pub trait TryLogWithStatistics: TryLog + State<usize> {
+TryLogWithStatistics in delog - Rust pub trait TryLogWithStatistics: TryLog + State<usize> {
// Provided method
fn statistics(&self) -> Statistics { ... }
}
Expand description
TryLog with some usage statistics on top.
-Provided Methods§
sourcefn statistics(&self) -> Statistics
Read out statistics on logger usage.
+Provided Methods§
Sourcefn statistics(&self) -> Statistics
Read out statistics on logger usage.
Implementors§
\ No newline at end of file
diff --git a/flexiber/all.html b/flexiber/all.html
index b8f72ca..2d9863c 100644
--- a/flexiber/all.html
+++ b/flexiber/all.html
@@ -1 +1 @@
-List of all items in this crate
\ No newline at end of file
+List of all items in this crate
\ No newline at end of file
diff --git a/flexiber/derive.Decodable.html b/flexiber/derive.Decodable.html
index ecad1ed..a05d1ff 100644
--- a/flexiber/derive.Decodable.html
+++ b/flexiber/derive.Decodable.html
@@ -1,4 +1,4 @@
-Decodable in flexiber - Rust #[derive(Decodable)]
+Decodable in flexiber - Rust #[derive(Decodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber/derive.Encodable.html b/flexiber/derive.Encodable.html
index e0418bf..3069285 100644
--- a/flexiber/derive.Encodable.html
+++ b/flexiber/derive.Encodable.html
@@ -1,4 +1,4 @@
-Encodable in flexiber - Rust #[derive(Encodable)]
+Encodable in flexiber - Rust #[derive(Encodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber/enum.Class.html b/flexiber/enum.Class.html
index 8c957bf..575f38d 100644
--- a/flexiber/enum.Class.html
+++ b/flexiber/enum.Class.html
@@ -1,19 +1,19 @@
-Class in flexiber - Rust #[repr(u8)]pub enum Class {
+Class in flexiber - Rust #[repr(u8)]pub enum Class {
Universal = 0,
Application = 1,
Context = 2,
Private = 3,
}
Expand description
Class of BER tag.
-Variants§
Trait Implementations§
source§impl Copy for Class
source§impl Eq for Class
source§impl StructuralPartialEq for Class
Auto Trait Implementations§
§impl Freeze for Class
§impl RefUnwindSafe for Class
§impl Send for Class
§impl Sync for Class
§impl Unpin for Class
§impl UnwindSafe for Class
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
Variants§
Trait Implementations§
Source§impl Copy for Class
Source§impl Eq for Class
Source§impl StructuralPartialEq for Class
Auto Trait Implementations§
§impl Freeze for Class
§impl RefUnwindSafe for Class
§impl Send for Class
§impl Sync for Class
§impl Unpin for Class
§impl UnwindSafe for Class
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/enum.ErrorKind.html b/flexiber/enum.ErrorKind.html
index 8f62ff9..9bab390 100644
--- a/flexiber/enum.ErrorKind.html
+++ b/flexiber/enum.ErrorKind.html
@@ -1,10 +1,10 @@
-ErrorKind in flexiber - Rust #[non_exhaustive]pub enum ErrorKind {
+ErrorKind in flexiber - Rust #[non_exhaustive]pub enum ErrorKind {
Failed,
InvalidClass {
- value: u8,
+ value: u8,
},
InvalidTag {
- byte: u8,
+ byte: u8,
},
InvalidLength,
Length {
@@ -22,15 +22,15 @@
actual: Length,
},
UnexpectedTag {
- expected: Option<Tag>,
+ expected: Option<Tag>,
actual: Tag,
},
UnsupportedTagSize,
}
Expand description
Error type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.§Failed
Operation failed due to previous error
§InvalidClass
Class has more than 2 bytes
-§InvalidTag
Invalid tag
-Fields
§byte: u8Raw byte value of the tag
+§InvalidTag
Invalid tag
+§InvalidLength
Length greater than u16::MAX
§Length
Incorrect length for a given field
Fields
§tag: TagTag type of the value being decoded
@@ -45,23 +45,23 @@
§UnexpectedTag
Unexpected tag
-Fields
§expected: Option<Tag>Tag the decoder was expecting (if there is a single such tag).
+Fields
§UnsupportedTagSize
Tag does not fit in 3 bytes
-Implementations§
source§impl ErrorKind
Implementations§
Trait Implementations§
source§impl Copy for ErrorKind
source§impl Eq for ErrorKind
source§impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
§impl Freeze for ErrorKind
§impl RefUnwindSafe for ErrorKind
§impl Send for ErrorKind
§impl Sync for ErrorKind
§impl Unpin for ErrorKind
§impl UnwindSafe for ErrorKind
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
Source§impl Copy for ErrorKind
Source§impl Eq for ErrorKind
Source§impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
§impl Freeze for ErrorKind
§impl RefUnwindSafe for ErrorKind
§impl Send for ErrorKind
§impl Sync for ErrorKind
§impl Unpin for ErrorKind
§impl UnwindSafe for ErrorKind
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/index.html b/flexiber/index.html
index 7fef246..c680623 100644
--- a/flexiber/index.html
+++ b/flexiber/index.html
@@ -1,4 +1,4 @@
-flexiber - Rust Expand description
§flexiber
+flexiber - Rust Expand description
§flexiber
Implementation of the BER-TLV serialization format from ISO 7816-4:2005.
ITU-T X.690 (08/2015) defines the BER, CER and DER encoding rules for ASN.1
The exact same document is ISO/IET 8825-1, which is freely available,
diff --git a/flexiber/struct.Decoder.html b/flexiber/struct.Decoder.html
index 8fa0018..a541383 100644
--- a/flexiber/struct.Decoder.html
+++ b/flexiber/struct.Decoder.html
@@ -1,30 +1,30 @@
-
Decoder in flexiber - Rust pub struct Decoder<'a> { /* private fields */ }
Expand description
BER-TLV decoder.
-Implementations§
source§impl<'a> Decoder<'a>
sourcepub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>
Decode a value which impls the Decodable trait.
-sourcepub fn decode_tagged_value<T: Decodable<'a> + TagLike, V: Decodable<'a>>(
+Decoder in flexiber - Rust pub struct Decoder<'a> { /* private fields */ }
Expand description
BER-TLV decoder.
+Implementations§
Source§impl<'a> Decoder<'a>
Sourcepub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>
Decode a value which impls the Decodable trait.
+Sourcepub fn decode_tagged_value<T: Decodable<'a> + TagLike, V: Decodable<'a>>(
&mut self,
tag: T,
) -> Result<V>
Decode a TaggedValue with tag checked to be as expected, returning the value
-sourcepub fn decode_tagged_slice<T: Decodable<'a> + TagLike>(
+
Sourcepub fn decode_tagged_slice<T: Decodable<'a> + TagLike>(
&mut self,
tag: T,
-) -> Result<&'a [u8]>
Decode a TaggedSlice with tag checked to be as expected, returning the value
-sourcepub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>
Return an error with the given ErrorKind, annotating it with
+) -> Result<&'a [u8]>
Decode a TaggedSlice with tag checked to be as expected, returning the value
+Sourcepub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>
Return an error with the given ErrorKind, annotating it with
context about where the error occurred.
-sourcepub fn finish<T>(self, value: T) -> Result<T>
Finish decoding, returning the given value if there is no
+
Sourcepub fn finish<T>(self, value: T) -> Result<T>
Finish decoding, returning the given value if there is no
remaining data, or an error otherwise
-sourcepub fn is_finished(&self) -> bool
Have we decoded all of the bytes in this Decoder?
+Sourcepub fn is_finished(&self) -> bool
Have we decoded all of the bytes in this Decoder?
Returns false if we’re not finished decoding or if a fatal error
has occurred.
-Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Decoder<'a>
§impl<'a> RefUnwindSafe for Decoder<'a>
§impl<'a> Send for Decoder<'a>
§impl<'a> Sync for Decoder<'a>
§impl<'a> Unpin for Decoder<'a>
§impl<'a> UnwindSafe for Decoder<'a>
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Decoder<'a>
§impl<'a> RefUnwindSafe for Decoder<'a>
§impl<'a> Send for Decoder<'a>
§impl<'a> Sync for Decoder<'a>
§impl<'a> Unpin for Decoder<'a>
§impl<'a> UnwindSafe for Decoder<'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 more
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.Encoder.html b/flexiber/struct.Encoder.html
index 09d58cb..a2774b1 100644
--- a/flexiber/struct.Encoder.html
+++ b/flexiber/struct.Encoder.html
@@ -1,28 +1,28 @@
-Encoder in flexiber - Rust pub struct Encoder<'a> { /* private fields */ }
Expand description
BER-TLV encoder.
-Implementations§
source§impl<'a> Encoder<'a>
sourcepub fn new(bytes: &'a mut [u8]) -> Self
Create a new encoder with the given byte slice as a backing buffer.
-sourcepub fn encode<T: Encodable>(&mut self, encodable: &T) -> Result<()>
Encode a value which impls the Encodable trait.
-sourcepub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>
Return an error with the given ErrorKind, annotating it with
+
Encoder in flexiber - Rust pub struct Encoder<'a> { /* private fields */ }
Expand description
BER-TLV encoder.
+Implementations§
Source§impl<'a> Encoder<'a>
Sourcepub fn new(bytes: &'a mut [u8]) -> Self
Create a new encoder with the given byte slice as a backing buffer.
+Sourcepub fn encode<T: Encodable>(&mut self, encodable: &T) -> Result<()>
Encode a value which impls the Encodable trait.
+Sourcepub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>
Return an error with the given ErrorKind, annotating it with
context about where the error occurred.
-sourcepub fn finish(self) -> Result<&'a [u8]>
Finish encoding to the buffer, returning a slice containing the data
+
Sourcepub fn finish(self) -> Result<&'a [u8]>
Finish encoding to the buffer, returning a slice containing the data
written to the buffer.
-sourcepub fn encode_tagged_collection(
+
Sourcepub fn encode_tagged_collection(
&mut self,
tag: Tag,
encodables: &[&dyn Encodable],
-) -> Result<()>
Encode a collection of values which impl the Encodable trait under a given tag.
-sourcepub fn encode_untagged_collection(
+) -> Result<()>
Encode a collection of values which impl the Encodable trait under a given tag.
+Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Encoder<'a>
§impl<'a> RefUnwindSafe for Encoder<'a>
§impl<'a> Send for Encoder<'a>
§impl<'a> Sync for Encoder<'a>
§impl<'a> Unpin for Encoder<'a>
§impl<'a> !UnwindSafe for Encoder<'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, U> Into<U> for Twhere
- U: From<T>,
Trait Implementations§
Auto Trait Implementations§
§impl<'a> Freeze for Encoder<'a>
§impl<'a> RefUnwindSafe for Encoder<'a>
§impl<'a> Send for Encoder<'a>
§impl<'a> Sync for Encoder<'a>
§impl<'a> Unpin for Encoder<'a>
§impl<'a> !UnwindSafe for Encoder<'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 more
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.Error.html b/flexiber/struct.Error.html
index 2225b46..a25cbdb 100644
--- a/flexiber/struct.Error.html
+++ b/flexiber/struct.Error.html
@@ -1,19 +1,19 @@
-Error in flexiber - Rust pub struct Error { /* private fields */ }
Expand description
Error type.
-Implementations§
source§impl Error
sourcepub fn position(self) -> Option<Length>
Get the position inside of the message where the error occurred.
-sourcepub fn nested(self, nested_position: Length) -> Self
For errors occurring inside of a nested message, extend the position
+
Error in flexiber - Rust pub struct Error { /* private fields */ }
Expand description
Error type.
+Implementations§
Trait Implementations§
source§impl From<Infallible> for Error
source§fn from(_: Infallible) -> Error
Converts to this type from the input type.source§impl Copy for Error
source§impl Eq for Error
source§impl StructuralPartialEq for Error
Auto Trait Implementations§
§impl Freeze for Error
§impl RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl UnwindSafe for Error
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
Source§impl From<Infallible> for Error
Source§fn from(_: Infallible) -> Error
Converts to this type from the input type.Source§impl Copy for Error
Source§impl Eq for Error
Source§impl StructuralPartialEq for Error
Auto Trait Implementations§
§impl Freeze for Error
§impl RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl UnwindSafe for Error
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.Length.html b/flexiber/struct.Length.html
index c3147e8..b77c65b 100644
--- a/flexiber/struct.Length.html
+++ b/flexiber/struct.Length.html
@@ -1,4 +1,4 @@
-Length in flexiber - Rust pub struct Length(/* private fields */);
Expand description
BER-TLV-encoded length.
+Length in flexiber - Rust pub struct Length(/* private fields */);
Expand description
BER-TLV-encoded length.
By definition, in the range 0..=65535
The length field consists of one or three consecutive bytes.
@@ -7,27 +7,27 @@ zero to 254.
- If the first byte is
0xFF, then the length field consists of the subsequent two bytes interpreted as
big-endian integer, with any value from zero to 65,535.
-Implementations§
Trait Implementations§
source§impl Encodable for Length
source§impl Ord for Length
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
- Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialOrd for Length
source§impl<'a> TryFrom<&'a [&'a dyn Encodable]> for Length
Calculate the sum of the encoded lengths of the encodables.
-source§impl Copy for Length
source§impl Eq for Length
source§impl StructuralPartialEq for Length
Auto Trait Implementations§
§impl Freeze for Length
§impl RefUnwindSafe for Length
§impl Send for Length
§impl Sync for Length
§impl Unpin for Length
§impl UnwindSafe for Length
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
Implementations§
Trait Implementations§
Source§impl Encodable for Length
Source§impl Ord for Length
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
+ Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialOrd for Length
Source§impl<'a> TryFrom<&'a [&'a dyn Encodable]> for Length
Calculate the sum of the encoded lengths of the encodables.
+Source§impl Copy for Length
Source§impl Eq for Length
Source§impl StructuralPartialEq for Length
Auto Trait Implementations§
§impl Freeze for Length
§impl RefUnwindSafe for Length
§impl Send for Length
§impl Sync for Length
§impl Unpin for Length
§impl UnwindSafe for Length
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.SimpleTag.html b/flexiber/struct.SimpleTag.html
index be77b1d..3c21c69 100644
--- a/flexiber/struct.SimpleTag.html
+++ b/flexiber/struct.SimpleTag.html
@@ -1,20 +1,20 @@
-SimpleTag in flexiber - Rust pub struct SimpleTag(/* private fields */);
Expand description
These are tags like in SIMPLE-TLV.
+SimpleTag in flexiber - Rust pub struct SimpleTag(/* private fields */);
Expand description
These are tags like in SIMPLE-TLV.
The tag field consists of a single byte encoding a tag number from 1 to 254. The values ‘00’ and ‘FF’ are invalid.
The use case is that PIV (FIPS 201) data objects generally use BER-TLV, but, for historical reasons,
label entries with “simple” tags (in particular, tag numbers larger than 30 are still encoded
as single bytes.
-Trait Implementations§
source§impl Encodable for SimpleTag
source§impl TagLike for SimpleTag
source§fn embedding(self) -> Tag
To stick with one Error type, make sure the tag type can somehow
-or other be coerced into a BerTag.source§fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and valuesource§impl Copy for SimpleTag
source§impl Eq for SimpleTag
source§impl StructuralPartialEq for SimpleTag
Auto Trait Implementations§
§impl Freeze for SimpleTag
§impl RefUnwindSafe for SimpleTag
§impl Send for SimpleTag
§impl Sync for SimpleTag
§impl Unpin for SimpleTag
§impl UnwindSafe for SimpleTag
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
Trait Implementations§
Source§impl Encodable for SimpleTag
Source§impl TagLike for SimpleTag
Source§fn embedding(self) -> Tag
To stick with one Error type, make sure the tag type can somehow
+or other be coerced into a BerTag.Source§fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and valueSource§impl Copy for SimpleTag
Source§impl Eq for SimpleTag
Source§impl StructuralPartialEq for SimpleTag
Auto Trait Implementations§
§impl Freeze for SimpleTag
§impl RefUnwindSafe for SimpleTag
§impl Send for SimpleTag
§impl Sync for SimpleTag
§impl Unpin for SimpleTag
§impl UnwindSafe for SimpleTag
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.Slice.html b/flexiber/struct.Slice.html
index c58898c..3a81f89 100644
--- a/flexiber/struct.Slice.html
+++ b/flexiber/struct.Slice.html
@@ -1,19 +1,19 @@
-Slice in flexiber - Rust pub struct Slice<'a> { /* private fields */ }
Expand description
Slice of at most Length::max() bytes.
-Implementations§
source§impl<'a> Slice<'a>
sourcepub fn new(slice: &'a [u8]) -> Result<Self>
Create a new Slice, ensuring that the provided slice value
+
Slice in flexiber - Rust pub struct Slice<'a> { /* private fields */ }
Expand description
Slice of at most Length::max() bytes.
+Implementations§
Trait Implementations§
source§impl<'a> Copy for Slice<'a>
source§impl<'a> Eq for Slice<'a>
source§impl<'a> StructuralPartialEq for Slice<'a>
Auto Trait Implementations§
§impl<'a> Freeze for Slice<'a>
§impl<'a> RefUnwindSafe for Slice<'a>
§impl<'a> Send for Slice<'a>
§impl<'a> Sync for Slice<'a>
§impl<'a> Unpin for Slice<'a>
§impl<'a> UnwindSafe for Slice<'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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
Source§impl<'a> Copy for Slice<'a>
Source§impl<'a> Eq for Slice<'a>
Source§impl<'a> StructuralPartialEq for Slice<'a>
Auto Trait Implementations§
§impl<'a> Freeze for Slice<'a>
§impl<'a> RefUnwindSafe for Slice<'a>
§impl<'a> Send for Slice<'a>
§impl<'a> Sync for Slice<'a>
§impl<'a> Unpin for Slice<'a>
§impl<'a> UnwindSafe for Slice<'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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.Tag.html b/flexiber/struct.Tag.html
index 04e593e..5ed868e 100644
--- a/flexiber/struct.Tag.html
+++ b/flexiber/struct.Tag.html
@@ -1,20 +1,20 @@
-Tag in flexiber - Rust pub struct Tag {
+Tag in flexiber - Rust pub struct Tag {
pub class: Class,
- pub constructed: bool,
- pub number: u16,
+ pub constructed: bool,
+ pub number: u16,
}
Expand description
The tag field consists of a single byte encoding a tag number from 1 to 254. The values ‘00’ and ‘FF’ are invalid.
-Fields§
§class: Class§constructed: bool§number: u16Implementations§
source§impl Tag
sourcepub const BOOLEAN: Self = _
sourcepub const INTEGER: Self = _
sourcepub const BIT_STRING: Self = _
sourcepub const OCTET_STRING: Self = _
sourcepub const NULL: Self = _
sourcepub const OBJECT_IDENTIFIER: Self = _
sourcepub const UTF8_STRING: Self = _
sourcepub const PRINTABLE_STRING: Self = _
sourcepub const UTC_TIME: Self = _
sourcepub const GENERALIZED_TIME: Self = _
sourcepub const SEQUENCE: Self = _
sourcepub const SET: Self = _
sourcepub fn from(class: Class, constructed: bool, number: u16) -> Self
sourcepub const fn universal(number: u16) -> Self
sourcepub const fn application(number: u16) -> Self
sourcepub const fn context(number: u16) -> Self
sourcepub const fn private(number: u16) -> Self
sourcepub const fn constructed(self) -> Self
Trait Implementations§
source§impl Encodable for Tag
source§impl TagLike for Tag
source§fn embedding(self) -> Tag
To stick with one Error type, make sure the tag type can somehow
-or other be coerced into a BerTag.source§fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and valuesource§impl Copy for Tag
source§impl Eq for Tag
source§impl StructuralPartialEq for Tag
Auto Trait Implementations§
§impl Freeze for Tag
§impl RefUnwindSafe for Tag
§impl Send for Tag
§impl Sync for Tag
§impl Unpin for Tag
§impl UnwindSafe for Tag
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
Fields§
§class: Class§constructed: bool§number: u16Implementations§
Source§impl Tag
Sourcepub const BOOLEAN: Self = _
Sourcepub const INTEGER: Self = _
Sourcepub const BIT_STRING: Self = _
Sourcepub const OCTET_STRING: Self = _
Sourcepub const NULL: Self = _
Sourcepub const OBJECT_IDENTIFIER: Self = _
Sourcepub const UTF8_STRING: Self = _
Sourcepub const PRINTABLE_STRING: Self = _
Sourcepub const UTC_TIME: Self = _
Sourcepub const GENERALIZED_TIME: Self = _
Sourcepub const SEQUENCE: Self = _
Sourcepub const SET: Self = _
Sourcepub fn from(class: Class, constructed: bool, number: u16) -> Self
Sourcepub const fn universal(number: u16) -> Self
Sourcepub const fn application(number: u16) -> Self
Sourcepub const fn context(number: u16) -> Self
Sourcepub const fn private(number: u16) -> Self
Sourcepub const fn constructed(self) -> Self
Trait Implementations§
Source§impl Encodable for Tag
Source§impl TagLike for Tag
Source§fn embedding(self) -> Tag
To stick with one Error type, make sure the tag type can somehow
+or other be coerced into a BerTag.Source§fn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and valueSource§impl Copy for Tag
Source§impl Eq for Tag
Source§impl StructuralPartialEq for Tag
Auto Trait Implementations§
§impl Freeze for Tag
§impl RefUnwindSafe for Tag
§impl Send for Tag
§impl Sync for Tag
§impl Unpin for Tag
§impl UnwindSafe for Tag
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/struct.TaggedValue.html b/flexiber/struct.TaggedValue.html
index 6d01a9c..db5ccfd 100644
--- a/flexiber/struct.TaggedValue.html
+++ b/flexiber/struct.TaggedValue.html
@@ -1,39 +1,39 @@
-TaggedValue in flexiber - Rust pub struct TaggedValue<V, T = Tag> { /* private fields */ }
Expand description
BER-TLV data object.
-Implementations§
source§impl<V, T> TaggedValue<V, T>where
- T: Copy,
source§impl<'a, T> TaggedValue<Slice<'a>, T>where
- T: Copy,
sourcepub fn from(tag: T, slice: &'a [u8]) -> Result<Self>
Create a new tagged slice, checking lengths.
-sourcepub fn decode_nested<F, R>(&self, f: F) -> Result<R>
Decode nested values, creating a new Decoder for
+
TaggedValue in flexiber - Rust pub struct TaggedValue<V, T = Tag> { /* private fields */ }
Expand description
BER-TLV data object.
+Implementations§
Source§impl<V, T> TaggedValue<V, T>where
+ T: Copy,
Trait Implementations§
source§impl<V: Clone, T: Clone> Clone for TaggedValue<V, T>
source§fn clone(&self) -> TaggedValue<V, T>
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreTrait Implementations§
Source§impl<V: Clone, T: Clone> Clone for TaggedValue<V, T>
Source§fn clone(&self) -> TaggedValue<V, T>
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl<E, T> Encodable for TaggedValue<&E, T>
source§impl<V: Copy, T: Copy> Copy for TaggedValue<V, T>
source§impl<V: Eq, T: Eq> Eq for TaggedValue<V, T>
source§impl<V, T> StructuralPartialEq for TaggedValue<V, T>
Auto Trait Implementations§
§impl<V, T> Freeze for TaggedValue<V, T>
§impl<V, T> RefUnwindSafe for TaggedValue<V, T>where
- T: RefUnwindSafe,
- V: RefUnwindSafe,
§impl<V, T> Send for TaggedValue<V, T>
§impl<V, T> Sync for TaggedValue<V, T>
§impl<V, T> Unpin for TaggedValue<V, T>
§impl<V, T> UnwindSafe for TaggedValue<V, T>where
- T: UnwindSafe,
- V: UnwindSafe,
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)source§impl<T, U> Into<U> for Twhere
- U: From<T>,
source§fn into(self) -> U
Source§impl<V: Copy, T: Copy> Copy for TaggedValue<V, T>
Source§impl<V: Eq, T: Eq> Eq for TaggedValue<V, T>
Source§impl<V, T> StructuralPartialEq for TaggedValue<V, T>
Auto Trait Implementations§
§impl<V, T> Freeze for TaggedValue<V, T>
§impl<V, T> RefUnwindSafe for TaggedValue<V, T>where
+ T: RefUnwindSafe,
+ V: RefUnwindSafe,
§impl<V, T> Send for TaggedValue<V, T>
§impl<V, T> Sync for TaggedValue<V, T>
§impl<V, T> Unpin for TaggedValue<V, T>
§impl<V, T> UnwindSafe for TaggedValue<V, T>where
+ T: UnwindSafe,
+ V: UnwindSafe,
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/flexiber/trait.Container.html b/flexiber/trait.Container.html
index a940fbe..79e5133 100644
--- a/flexiber/trait.Container.html
+++ b/flexiber/trait.Container.html
@@ -1,13 +1,13 @@
-Container in flexiber - Rust pub trait Container {
+Container in flexiber - Rust pub trait Container {
// Required method
fn fields<F, T>(&self, f: F) -> Result<T>
- where F: FnOnce(&[&dyn Encodable]) -> Result<T>;
+ where F: FnOnce(&[&dyn Encodable]) -> Result<T>;
}
Expand description
Multiple encodables in a container.
A container implementing Tagged has a blanked implementation of Encodable.
-Required Methods§
\ No newline at end of file
+
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
diff --git a/flexiber/trait.Decodable.html b/flexiber/trait.Decodable.html
index 18ff9ba..694c408 100644
--- a/flexiber/trait.Decodable.html
+++ b/flexiber/trait.Decodable.html
@@ -1,17 +1,17 @@
-Decodable in flexiber - Rust pub trait Decodable<'a>: Sized {
+Decodable in flexiber - Rust pub trait Decodable<'a>: Sized {
// Required method
fn decode(decoder: &mut Decoder<'a>) -> Result<Self>;
// Provided method
- fn from_bytes(bytes: &'a [u8]) -> Result<Self> { ... }
+ fn from_bytes(bytes: &'a [u8]) -> Result<Self> { ... }
}
Expand description
Decoding trait.
Decode out of decoder, which essentially is a slice of bytes.
One way to implement this trait is to implement TryFrom<TaggedSlice<'_>, Error = Error>.
-Required Methods§
Provided Methods§
sourcefn from_bytes(bytes: &'a [u8]) -> Result<Self>
Parse Self from the provided byte slice.
-Object Safety§
This trait is not object safe.Implementations on Foreign Types§
Required Methods§
Provided Methods§
Sourcefn from_bytes(bytes: &'a [u8]) -> Result<Self>
Parse Self from the provided byte slice.
+Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<'a, T> Decodable<'a> for Option<T>
This implementation is quite gotcha-y, since only one byte is peeked.
It should evaluate to the desired tag via Tag::try_from(byte)?.
-Implementors§
\ No newline at end of file
+
Implementors§
\ No newline at end of file
diff --git a/flexiber/trait.Encodable.html b/flexiber/trait.Encodable.html
index 307ae4d..bf2cf60 100644
--- a/flexiber/trait.Encodable.html
+++ b/flexiber/trait.Encodable.html
@@ -1,55 +1,55 @@
-Encodable in flexiber - Rust pub trait Encodable {
+Encodable in flexiber - Rust pub trait Encodable {
// Required methods
fn encoded_length(&self) -> Result<Length>;
- fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>;
+ fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>;
// Provided method
- fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]> { ... }
+ fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]> { ... }
}
Expand description
Encoding trait.
Encode into encoder, which essentially is a mutable slice of bytes.
Additionally, the encoded length needs to be known without actually encoding.
-Required Methods§
sourcefn encoded_length(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as BER-TLV
-Provided Methods§
sourcefn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Encode this value to the provided byte slice, returning a sub-slice
+
Required Methods§
Sourcefn encoded_length(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as BER-TLV
+Provided Methods§
Sourcefn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
-Implementations on Foreign Types§
Implementors§
source§impl Encodable for Length
source§impl Encodable for SimpleTag
source§impl Encodable for Tag
source§impl<E, T> Encodable for TaggedValue<&E, T>where
+
Implementations on Foreign Types§
Implementors§
Source§impl Encodable for Length
Source§impl Encodable for SimpleTag
Source§impl Encodable for Tag
Source§impl<E, T> Encodable for TaggedValue<&E, T>
source§impl<T> Encodable for TaggedSlice<'_, T>
source§impl<TaggedContainer> Encodable for TaggedContainer
Source§impl<T> Encodable for TaggedSlice<'_, T>
Source§impl<TaggedContainer> Encodable for TaggedContainer
\ No newline at end of file
diff --git a/flexiber/trait.TagLike.html b/flexiber/trait.TagLike.html
index 7c66be7..d5562f0 100644
--- a/flexiber/trait.TagLike.html
+++ b/flexiber/trait.TagLike.html
@@ -1,7 +1,7 @@
-TagLike in flexiber - Rust pub trait TagLike:
- Copy
- + PartialEq
- + Sized {
+TagLike in flexiber - Rust pub trait TagLike:
+ Copy
+ + PartialEq
+ + Sized {
// Required method
fn embedding(self) -> Tag;
@@ -10,9 +10,9 @@
fn with_value<V>(self, value: V) -> TaggedValue<V, Self> { ... }
}
Expand description
This is the common trait that types to be used as tags
are supposed to implement.
-Required Methods§
Required Methods§
Provided Methods§
Provided Methods§
Sourcefn assert_eq(self, expected: Self) -> Result<Self>
Assert that this Tag matches the provided expected tag.
On mismatch, returns an Error with ErrorKind::UnexpectedTag.
-sourcefn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and value
-Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
+Sourcefn with_value<V>(self, value: V) -> TaggedValue<V, Self>
Ergonomic way to get a TaggedValue for a given tag and value
+
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
diff --git a/flexiber/trait.Tagged.html b/flexiber/trait.Tagged.html
index b3470d5..ffd4fe4 100644
--- a/flexiber/trait.Tagged.html
+++ b/flexiber/trait.Tagged.html
@@ -1,7 +1,7 @@
-Tagged in flexiber - Rust pub trait Tagged {
+Tagged in flexiber - Rust
\ No newline at end of file
+
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
diff --git a/flexiber/type.Result.html b/flexiber/type.Result.html
index b8b54b2..2be2e0f 100644
--- a/flexiber/type.Result.html
+++ b/flexiber/type.Result.html
@@ -1,7 +1,7 @@
-Result in flexiber - Rust pub type Result<T> = Result<T, Error>;
Trait Implementations§
\ No newline at end of file
diff --git a/flexiber/type.TaggedSlice.html b/flexiber/type.TaggedSlice.html
index a96795b..ec64b32 100644
--- a/flexiber/type.TaggedSlice.html
+++ b/flexiber/type.TaggedSlice.html
@@ -1,14 +1,14 @@
-TaggedSlice in flexiber - Rust pub type TaggedSlice<'a, T = Tag> = TaggedValue<Slice<'a>, T>;
Expand description
Raw BER-TLV data object TaggedValue<Slice<'_>>.
-Aliased Type§
struct TaggedSlice<'a, T = Tag> { /* private fields */ }
Implementations§
source§impl<'a, T> TaggedSlice<'a, T>where
- T: Copy,
sourcepub fn from(tag: T, slice: &'a [u8]) -> Result<Self>
Create a new tagged slice, checking lengths.
-sourcepub fn decode_nested<F, R>(&self, f: F) -> Result<R>
Decode nested values, creating a new Decoder for
+
TaggedSlice in flexiber - Rust pub type TaggedSlice<'a, T = Tag> = TaggedValue<Slice<'a>, T>;
Expand description
Raw BER-TLV data object TaggedValue<Slice<'_>>.
+Aliased Type§
struct TaggedSlice<'a, T = Tag> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<'a, T> Decodable<'a> for TaggedSlice<'a, T>
Trait Implementations§
Source§impl<'a, T> Decodable<'a> for TaggedSlice<'a, T>
\ No newline at end of file
diff --git a/flexiber_derive/all.html b/flexiber_derive/all.html
index d0226ad..47910d2 100644
--- a/flexiber_derive/all.html
+++ b/flexiber_derive/all.html
@@ -1 +1 @@
-List of all items in this crate
\ No newline at end of file
+List of all items in this crate
\ No newline at end of file
diff --git a/flexiber_derive/derive.Decodable.html b/flexiber_derive/derive.Decodable.html
index c769744..3c2246c 100644
--- a/flexiber_derive/derive.Decodable.html
+++ b/flexiber_derive/derive.Decodable.html
@@ -1,4 +1,4 @@
-Decodable in flexiber_derive - Rust #[derive(Decodable)]
+Decodable in flexiber_derive - Rust #[derive(Decodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber_derive/derive.Encodable.html b/flexiber_derive/derive.Encodable.html
index ce23ce4..63d0aaf 100644
--- a/flexiber_derive/derive.Encodable.html
+++ b/flexiber_derive/derive.Encodable.html
@@ -1,4 +1,4 @@
-Encodable in flexiber_derive - Rust #[derive(Encodable)]
+Encodable in flexiber_derive - Rust #[derive(Encodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber_derive/index.html b/flexiber_derive/index.html
index 901a8ff..81f50be 100644
--- a/flexiber_derive/index.html
+++ b/flexiber_derive/index.html
@@ -1,4 +1,4 @@
-flexiber_derive - Rust Expand description
Custom derive support for the flexiber crate
+flexiber_derive - Rust Expand description
Custom derive support for the flexiber crate
With #[tlv(slice)] set, Encodable should work for fields implementing AsRef<[u8]>,
and Decodable should work for fields implementing TryFrom<[u8]>, even if the field
is not Decodable or Encodable.
diff --git a/help.html b/help.html
index 3bb78ac..6008c37 100644
--- a/help.html
+++ b/help.html
@@ -1 +1 @@
-Help Rustdoc help
Back
\ No newline at end of file
+Help Rustdoc help
Back
\ No newline at end of file
diff --git a/log/all.html b/log/all.html
index 5312ded..e145420 100644
--- a/log/all.html
+++ b/log/all.html
@@ -1 +1 @@
-List of all items in this crate List of all items
Structs
Enums
Traits
Macros
Functions
Constants
\ No newline at end of file
+List of all items in this crate List of all items
Structs
Enums
Traits
Macros
Functions
Constants
\ No newline at end of file
diff --git a/log/constant.STATIC_MAX_LEVEL.html b/log/constant.STATIC_MAX_LEVEL.html
index cc13bde..5076a20 100644
--- a/log/constant.STATIC_MAX_LEVEL.html
+++ b/log/constant.STATIC_MAX_LEVEL.html
@@ -1,4 +1,4 @@
-STATIC_MAX_LEVEL in log - Rust pub const STATIC_MAX_LEVEL: LevelFilter;
Expand description
The statically resolved maximum log level.
+STATIC_MAX_LEVEL in log - Rust pub const STATIC_MAX_LEVEL: LevelFilter;
Expand description
The statically resolved maximum log level.
See the crate level documentation for information on how to configure this.
This value is checked by the log macros, but not by the Logger returned by
the logger function. Code that manually calls functions on that value
diff --git a/log/enum.Level.html b/log/enum.Level.html
index 834cae8..318e64e 100644
--- a/log/enum.Level.html
+++ b/log/enum.Level.html
@@ -1,4 +1,4 @@
-
Level in log - Rust #[repr(usize)]pub enum Level {
+Level in log - 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.
-
Implementations§
source§impl Level
sourcepub fn to_level_filter(&self) -> LevelFilter
Converts the Level to the equivalent LevelFilter.
-Implementations§
Source§impl Level
Sourcepub fn to_level_filter(&self) -> LevelFilter
Converts the Level to the equivalent LevelFilter.
+Sourcepub fn as_str(&self) -> &'static str
Returns the string representation of the Level.
This returns the same string as the fmt::Display implementation.
-Sourcepub fn iter() -> impl Iterator<Item = Self>
Iterate through all supported logging levels.
The order of iteration is from more severe to less severe log messages.
§Examples
use log::Level;
@@ -32,32 +32,32 @@
assert_eq!(Some(Level::Error), levels.next());
assert_eq!(Some(Level::Trace), levels.last());
-Trait Implementations§
source§impl Ord for Level
source§impl PartialEq<Level> for LevelFilter
source§impl PartialEq<LevelFilter> for Level
source§impl PartialOrd<Level> for LevelFilter
source§impl PartialOrd<LevelFilter> for Level
source§impl PartialOrd for Level
source§impl Copy for Level
source§impl Eq for Level
source§impl StructuralPartialEq for Level
Auto Trait Implementations§
§impl Freeze for Level
§impl RefUnwindSafe for Level
§impl Send for Level
§impl Sync for Level
§impl Unpin for Level
§impl UnwindSafe for Level
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
Source§impl Ord for Level
Source§impl PartialEq<Level> for LevelFilter
Source§impl PartialEq<LevelFilter> for Level
Source§impl PartialOrd<Level> for LevelFilter
Source§impl PartialOrd<LevelFilter> for Level
Source§impl PartialOrd for Level
Source§impl Copy for Level
Source§impl Eq for Level
Source§impl StructuralPartialEq for Level
Auto Trait Implementations§
§impl Freeze for Level
§impl RefUnwindSafe for Level
§impl Send for Level
§impl Sync for Level
§impl Unpin for Level
§impl UnwindSafe for Level
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/log/enum.LevelFilter.html b/log/enum.LevelFilter.html
index 9e54b16..290af3e 100644
--- a/log/enum.LevelFilter.html
+++ b/log/enum.LevelFilter.html
@@ -1,4 +1,4 @@
-LevelFilter in log - Rust #[repr(usize)]pub enum LevelFilter {
+LevelFilter in log - 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.
-
Implementations§
source§impl LevelFilter
sourcepub fn max() -> LevelFilter
Returns the most verbose logging level filter.
-Implementations§
Source§impl LevelFilter
Sourcepub fn max() -> LevelFilter
Returns the most verbose logging level filter.
+Sourcepub fn to_level(&self) -> Option<Level>
Converts self to the equivalent Level.
Returns None if self is LevelFilter::Off.
-Sourcepub fn as_str(&self) -> &'static str
Returns the string representation of the LevelFilter.
This returns the same string as the fmt::Display implementation.
-Sourcepub fn iter() -> impl Iterator<Item = Self>
Iterate through all supported filtering levels.
The order of iteration is from less to more verbose filtering.
§Examples
use log::LevelFilter;
@@ -28,32 +28,32 @@ to get and set the maximum log level with max_
assert_eq!(Some(LevelFilter::Off), levels.next());
assert_eq!(Some(LevelFilter::Trace), levels.last());
-Trait Implementations§
source§impl Clone for LevelFilter
source§fn clone(&self) -> LevelFilter
Returns a copy 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 LevelFilter
source§impl Display for LevelFilter
source§impl FromStr for LevelFilter
source§impl Hash for LevelFilter
source§impl Ord for LevelFilter
source§fn cmp(&self, other: &LevelFilter) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
- Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl PartialEq<Level> for LevelFilter
source§impl PartialEq<LevelFilter> for Level
source§impl PartialEq for LevelFilter
source§impl PartialOrd<Level> for LevelFilter
source§impl PartialOrd<LevelFilter> for Level
source§impl PartialOrd for LevelFilter
source§impl Copy for LevelFilter
source§impl Eq for LevelFilter
source§impl StructuralPartialEq for LevelFilter
Auto Trait Implementations§
§impl Freeze for LevelFilter
§impl RefUnwindSafe for LevelFilter
§impl Send for LevelFilter
§impl Sync for LevelFilter
§impl Unpin for LevelFilter
§impl UnwindSafe for LevelFilter
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
- T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (clone_to_uninit)Trait Implementations§
Source§impl Clone for LevelFilter
Source§fn clone(&self) -> LevelFilter
Returns a copy 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 LevelFilter
Source§impl Display for LevelFilter
Source§impl FromStr for LevelFilter
Source§impl Hash for LevelFilter
Source§impl Ord for LevelFilter
Source§fn cmp(&self, other: &LevelFilter) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
+ Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq<Level> for LevelFilter
Source§impl PartialEq<LevelFilter> for Level
Source§impl PartialEq for LevelFilter
Source§impl PartialOrd<Level> for LevelFilter
Source§impl PartialOrd<LevelFilter> for Level
Source§impl PartialOrd for LevelFilter
Source§impl Copy for LevelFilter
Source§impl Eq for LevelFilter
Source§impl StructuralPartialEq for LevelFilter
Auto Trait Implementations§
§impl Freeze for LevelFilter
§impl RefUnwindSafe for LevelFilter
§impl Send for LevelFilter
§impl Sync for LevelFilter
§impl Unpin for LevelFilter
§impl UnwindSafe for LevelFilter
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
+ T: Clone,
\ No newline at end of file
+From<T> for U chooses to do.
+
\ No newline at end of file
diff --git a/log/fn.logger.html b/log/fn.logger.html
index a991729..17b15a7 100644
--- a/log/fn.logger.html
+++ b/log/fn.logger.html
@@ -1,3 +1,3 @@
-logger in log - Rust pub fn logger() -> &'static dyn Log
Expand description
Returns a reference to the logger.
+logger in log - Rust
\ No newline at end of file
diff --git a/log/fn.max_level.html b/log/fn.max_level.html
index 6ac6681..b790bc9 100644
--- a/log/fn.max_level.html
+++ b/log/fn.max_level.html
@@ -1,4 +1,4 @@
-max_level in log - Rust pub fn max_level() -> LevelFilter
Expand description
Returns the current maximum log level.
+max_level in log - Rust pub fn max_level() -> LevelFilter
Expand description
Returns the current maximum log level.
The log!, error!, warn!, info!, debug!, and trace! macros check
this value and discard any message logged at a higher level. The maximum
log level is set by the set_max_level function.
diff --git a/log/fn.set_logger.html b/log/fn.set_logger.html
index 0d5276c..76ee80e 100644
--- a/log/fn.set_logger.html
+++ b/log/fn.set_logger.html
@@ -1,4 +1,4 @@
-set_logger in log - Rust pub fn set_logger(logger: &'static dyn Log) -> Result<(), SetLoggerError>
Expand description
Sets the global logger to a &'static Log.
+set_logger in log - Rust pub fn set_logger(logger: &'static dyn Log) -> Result<(), SetLoggerError>
Expand description
Sets the global logger to a &'static Log.
This function may only be called once in the lifetime of a program. Any log
events that occur before the call to set_logger completes will be ignored.
This function does not typically need to be called manually. Logger
diff --git a/log/fn.set_logger_racy.html b/log/fn.set_logger_racy.html
index b32fa05..3da67fa 100644
--- a/log/fn.set_logger_racy.html
+++ b/log/fn.set_logger_racy.html
@@ -1,6 +1,6 @@
-
set_logger_racy in log - Rust pub unsafe fn set_logger_racy(
+set_logger_racy in log - Rust pub unsafe fn set_logger_racy(
logger: &'static dyn Log,
-) -> Result<(), SetLoggerError>
Expand description
A thread-unsafe version of set_logger.
+) -> Result<(), SetLoggerError>Expand description
A thread-unsafe version of set_logger.
This function is available on all platforms, even those that do not have
support for atomics that is needed by set_logger.
In almost all cases, set_logger should be preferred.
diff --git a/log/fn.set_max_level.html b/log/fn.set_max_level.html
index b8d0833..e7d0fe9 100644
--- a/log/fn.set_max_level.html
+++ b/log/fn.set_max_level.html
@@ -1,4 +1,4 @@
-set_max_level in log - Rust