[][src]Trait better_any::TidAble

pub unsafe trait TidAble<'a>: Tid<'a> { }

This trait indicates that you can substitute this type as a type parameter to another type so that resulting type could implement Tid.

So if you don't have such generic types, just use Tid everywhere, you don't need to use this trait at all.

Only this trait is actually being implemented on user side. Other traits are mostly just blanket implementations over X:TidAble<'a>

Note that this trait interfere with object safety, so you shouldn't use it as a super trait if you are going to make a trait object. Formally it is still object safe, but you can't make a trait object from it without specifying internal associate type like: dyn TidAble<'a,Static=SomeType> which make this trait object effectively useless.

Unsafe because safety of this crate relies on correctness of this trait implementation. There are several safe ways to implement it:

  • #[derive(Tid)] derive macro
  • type_id declarative macro
  • impl_tid attribute macro

Implementations on Foreign Types

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for Box<T>[src]

type Static = Box<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for Rc<T>[src]

type Static = Rc<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for RefCell<T>[src]

type Static = RefCell<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for Cell<T>[src]

type Static = Cell<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for Arc<T>[src]

type Static = Arc<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for Mutex<T>[src]

type Static = Mutex<T::Static>

impl<'a, T: ?Sized + TidAble<'a>> TidAble<'a> for RwLock<T>[src]

type Static = RwLock<T::Static>

impl<'a, T> TidAble<'a> for Option<T> where
    T: TidAble<'a>, 
[src]

type Static = __OptionT_should_never_exist<T::Static>

impl<'a, T> TidAble<'a> for Vec<T> where
    T: TidAble<'a>, 
[src]

type Static = __VecT_should_never_exist<T::Static>

impl<'a, T, E> TidAble<'a> for Result<T, E> where
    T: TidAble<'a>,
    E: TidAble<'a>, 
[src]

type Static = __ResultTE_should_never_exist<T::Static, E::Static>

impl<'a, T: Any> TidAble<'a> for &'a T[src]

impl<'a, T: Any> TidAble<'a> for &'a mut T[src]

Loading content...

Implementors

impl<'a> TidAble<'a> for dyn Tid<'a> + 'a[src]

type Static = __dynTidaa_should_never_exist

Loading content...