Struct srcerr::fmt::Code [−][src]
pub struct Code<E>(_);
Formatting helpers for writing notes with consistent sentences.
Implementations
impl<E> Code<E> where
E: ErrorCode,
[src]
impl<E> Code<E> where
E: ErrorCode,
[src]pub fn string(error_code: E) -> String
[src]
Returns a String
representing the error code.
See Self::fmt_string
for a non-allocating version of this.
Parameters
error_code
: The error code.
pub fn fmt_string(buffer: &mut String, error_code: E) -> Result<(), Error>
[src]
Writes the error code into the buffer.
See Self::string
for a version that allocates a String
.
Parameters
buffer
: The buffer to write into.error_code
: The error code.
pub fn digits(value_max: usize) -> usize
[src]
Returns the number of digits that the given max value fits into.
Trait Implementations
Auto Trait Implementations
impl<E> RefUnwindSafe for Code<E> where
E: RefUnwindSafe,
impl<E> RefUnwindSafe for Code<E> where
E: RefUnwindSafe,
impl<E> UnwindSafe for Code<E> where
E: UnwindSafe,
impl<E> UnwindSafe for Code<E> where
E: UnwindSafe,