pub struct AccursedUnutterableTypeId(/* private fields */);Expand description
A unique type id for a type. A fancier (less fancy) std::any::TypeId without any
internal compiler magic!
It can easily be derived for your type. The derive is the only way to implement this trait.
use accursed_unutterable_type_id::AccursedUnutterablyTypeIdentified;
#[derive(AccursedUnutterablyTypeIdentified)]
struct Uwu;Implementations§
Source§impl AccursedUnutterableTypeId
impl AccursedUnutterableTypeId
Sourcepub fn of<T>() -> Selfwhere
T: AccursedUnutterablyTypeIdentified,
pub fn of<T>() -> Selfwhere
T: AccursedUnutterablyTypeIdentified,
Returns the accursed unutterable type id for the type.
use accursed_unutterable_type_id::{AccursedUnutterableTypeId, AccursedUnutterablyTypeIdentified};
#[derive(AccursedUnutterablyTypeIdentified)]
struct Uwu;
#[derive(AccursedUnutterablyTypeIdentified)]
struct Owo;
let uwu_id = AccursedUnutterableTypeId::of::<Uwu>();
let owo_id = AccursedUnutterableTypeId::of::<Owo>();
assert_ne!(uwu_id, owo_id);Trait Implementations§
Source§impl Clone for AccursedUnutterableTypeId
impl Clone for AccursedUnutterableTypeId
Source§fn clone(&self) -> AccursedUnutterableTypeId
fn clone(&self) -> AccursedUnutterableTypeId
Returns a duplicate 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 Debug for AccursedUnutterableTypeId
impl Debug for AccursedUnutterableTypeId
Source§impl Hash for AccursedUnutterableTypeId
impl Hash for AccursedUnutterableTypeId
impl Copy for AccursedUnutterableTypeId
impl Eq for AccursedUnutterableTypeId
impl StructuralPartialEq for AccursedUnutterableTypeId
Auto Trait Implementations§
impl Freeze for AccursedUnutterableTypeId
impl RefUnwindSafe for AccursedUnutterableTypeId
impl Send for AccursedUnutterableTypeId
impl Sync for AccursedUnutterableTypeId
impl Unpin for AccursedUnutterableTypeId
impl UnwindSafe for AccursedUnutterableTypeId
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