Struct allsorts::tag::DisplayTag
source · [−]pub struct DisplayTag(pub u32);
Expand description
Wrapper type for a tag that implements Display
Example:
use allsorts::tag::{self, DisplayTag};
// ASCII tag comes out as a string
assert_eq!(&DisplayTag(tag::NAME).to_string(), "name");
// Non-ASCII tag comes out as hex
assert_eq!(&DisplayTag(0x12345678).to_string(), "0x12345678");
println!("DisplayTag is handy for printing a tag: '{}'", DisplayTag(tag::CFF));
Tuple Fields
0: u32
Trait Implementations
sourceimpl Clone for DisplayTag
impl Clone for DisplayTag
sourcefn clone(&self) -> DisplayTag
fn clone(&self) -> DisplayTag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DisplayTag
impl Debug for DisplayTag
sourceimpl Display for DisplayTag
impl Display for DisplayTag
sourceimpl PartialEq<DisplayTag> for DisplayTag
impl PartialEq<DisplayTag> for DisplayTag
sourcefn eq(&self, other: &DisplayTag) -> bool
fn eq(&self, other: &DisplayTag) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DisplayTag) -> bool
fn ne(&self, other: &DisplayTag) -> bool
This method tests for !=
.
impl Copy for DisplayTag
impl Eq for DisplayTag
impl StructuralEq for DisplayTag
impl StructuralPartialEq for DisplayTag
Auto Trait Implementations
impl RefUnwindSafe for DisplayTag
impl Send for DisplayTag
impl Sync for DisplayTag
impl Unpin for DisplayTag
impl UnwindSafe for DisplayTag
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more