Debug

Struct Debug 

Source
pub struct Debug;
Expand description

A programmer-friendly repr for debugging purposes.

Often mimics the actual Rust structure of the type.

Can be derived via derive.

Equivalent of core::fmt::Debug.

Implementations§

Source§

impl Debug

Source

pub fn dbg_tuple<'w>(&self, f: &'w mut dyn Write, name: &str) -> DebugTuple<'w>

Assists with formatting tuple structs (or tuples, when name is empty).

Source

pub fn dbg_struct<'w>( &self, f: &'w mut dyn Write, name: &str, ) -> DebugStruct<'w>

Assists with formatting structs (or objects, when name is empty).

Trait Implementations§

Source§

impl Clone for Debug

Source§

fn clone(&self) -> Debug

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Debug

Source§

fn default() -> Debug

Returns the “default value” for a type. Read more
Source§

impl<T> Format<Debug> for [T]
where T: Format<Debug>,

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T, const N: usize> Format<Debug> for [T; N]
where T: Format<Debug>,

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for ()

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Binary

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Debug

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Dir

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Display

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Hex

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Kind

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Format<Debug>> Format<Debug> for Option<T>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<S: Format<Debug>> Format<Debug> for Pad<S>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<P: Format<Debug>, S: Format<Debug>> Format<Debug> for Prefix<P, S>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for Pretty

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Format<Debug>> Format<Debug> for RestdWrite<T>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Format<Debug>, E: Format<Debug>> Format<Debug> for Result<T, E>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Debug> Format<Debug> for StdDebug<T>

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Format<Debug>> Format<Debug> for StdDisplay<T>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T: Format<Debug>> Format<Debug> for StdWrite<T>

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for String

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl<T> Format<Debug> for Vec<T>
where T: Format<Debug>,

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for bool

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for char

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for f32

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for f64

Source§

fn fmt(&self, f: &mut dyn Write, s: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for i16

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for i32

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for i64

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for i8

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for isize

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for str

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for u16

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for u32

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for u64

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for u8

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Debug> for usize

Source§

fn fmt(&self, f: &mut dyn Write, _: &Debug) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Format<Pretty> for Debug

Source§

fn fmt(&self, f: &mut dyn Write, _: &Pretty) -> Result

Formats the value given a writer and a style.
Source§

fn stringify(&self, style: &S) -> String

Converts the value into a String.
Source§

impl Copy for Debug

Source§

impl Style for Debug

Auto Trait Implementations§

§

impl Freeze for Debug

§

impl RefUnwindSafe for Debug

§

impl Send for Debug

§

impl Sync for Debug

§

impl Unpin for Debug

§

impl UnwindSafe for Debug

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.