Struct tynm::TypeNameDisplay
source · pub struct TypeNameDisplay<'s> { /* private fields */ }
Expand description
Helper struct for printing type names directly to format!
.
This struct warps TypeName
and implements fmd::Display
to serve as
{}
argument to format!
and similar macros.
It can be obtained by the as_display
and as_display_mn
method.
Example
use tynm::TypeName;
let tn = TypeName::new::<usize>();
println!("{}", tn.as_display());
Trait Implementations§
source§impl<'s> Clone for TypeNameDisplay<'s>
impl<'s> Clone for TypeNameDisplay<'s>
source§fn clone(&self) -> TypeNameDisplay<'s>
fn clone(&self) -> TypeNameDisplay<'s>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'s> Debug for TypeNameDisplay<'s>
impl<'s> Debug for TypeNameDisplay<'s>
source§impl<'s> Display for TypeNameDisplay<'s>
impl<'s> Display for TypeNameDisplay<'s>
source§impl<'s> PartialEq<TypeNameDisplay<'s>> for TypeNameDisplay<'s>
impl<'s> PartialEq<TypeNameDisplay<'s>> for TypeNameDisplay<'s>
source§fn eq(&self, other: &TypeNameDisplay<'s>) -> bool
fn eq(&self, other: &TypeNameDisplay<'s>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'s> Eq for TypeNameDisplay<'s>
impl<'s> StructuralEq for TypeNameDisplay<'s>
impl<'s> StructuralPartialEq for TypeNameDisplay<'s>
Auto Trait Implementations§
impl<'s> RefUnwindSafe for TypeNameDisplay<'s>
impl<'s> Send for TypeNameDisplay<'s>
impl<'s> Sync for TypeNameDisplay<'s>
impl<'s> Unpin for TypeNameDisplay<'s>
impl<'s> UnwindSafe for TypeNameDisplay<'s>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more