Skip to main content

GetTypeRegistration

Trait GetTypeRegistration 

pub trait GetTypeRegistration: 'static {
    // Required method
    fn get_type_registration() -> TypeRegistration;

    // Provided method
    fn register_type_dependencies(_registry: &mut TypeRegistry) { ... }
}
Expand description

A trait which allows a type to generate its TypeRegistration for registration into the TypeRegistry.

This trait is automatically implemented for items using #[derive(Reflect)]. The macro also allows TypeData to be more easily registered.

If you need to use this trait as a generic bound along with other reflection traits, for your convenience, consider using Reflectable instead.

See the crate-level documentation for more information on type registration.

Required Methods§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.

Provided Methods§

fn register_type_dependencies(_registry: &mut TypeRegistry)

Registers other types needed by this type.

This method is called by TypeRegistry::register to register any other required types. Often, this is done for fields of structs and enum variants to ensure all types are properly registered.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl GetTypeRegistration for &'static str

§

impl GetTypeRegistration for &'static Location<'static>

§

impl GetTypeRegistration for Cow<'static, str>

§

impl GetTypeRegistration for SocketAddr

§

impl GetTypeRegistration for bool

§

impl GetTypeRegistration for char

§

impl GetTypeRegistration for f32

§

impl GetTypeRegistration for f64

§

impl GetTypeRegistration for i8

§

impl GetTypeRegistration for i16

§

impl GetTypeRegistration for i32

§

impl GetTypeRegistration for i64

§

impl GetTypeRegistration for i128

§

impl GetTypeRegistration for isize

§

impl GetTypeRegistration for u8

§

impl GetTypeRegistration for u16

§

impl GetTypeRegistration for u32

§

impl GetTypeRegistration for u64

§

impl GetTypeRegistration for u128

§

impl GetTypeRegistration for ()

§

impl GetTypeRegistration for usize

§

impl GetTypeRegistration for String

§

impl GetTypeRegistration for TypeId

§

impl GetTypeRegistration for NonZero<i8>

§

impl GetTypeRegistration for NonZero<i16>

§

impl GetTypeRegistration for NonZero<i32>

§

impl GetTypeRegistration for NonZero<i64>

§

impl GetTypeRegistration for NonZero<i128>

§

impl GetTypeRegistration for NonZero<isize>

§

impl GetTypeRegistration for NonZero<u8>

§

impl GetTypeRegistration for NonZero<u16>

§

impl GetTypeRegistration for NonZero<u32>

§

impl GetTypeRegistration for NonZero<u64>

§

impl GetTypeRegistration for NonZero<u128>

§

impl GetTypeRegistration for NonZero<usize>

§

impl GetTypeRegistration for RangeFull

§

impl GetTypeRegistration for AtomicBool

§

impl GetTypeRegistration for AtomicI8

§

impl GetTypeRegistration for AtomicI16

§

impl GetTypeRegistration for AtomicI32

§

impl GetTypeRegistration for AtomicI64

§

impl GetTypeRegistration for AtomicIsize

§

impl GetTypeRegistration for AtomicU8

§

impl GetTypeRegistration for AtomicU16

§

impl GetTypeRegistration for AtomicU32

§

impl GetTypeRegistration for AtomicU64

§

impl GetTypeRegistration for AtomicUsize

§

impl GetTypeRegistration for Duration

§

impl GetTypeRegistration for CuDuration

§

impl GetTypeRegistration for CuTimeRange

§

impl GetTypeRegistration for Instant

§

impl GetTypeRegistration for OptionCuTime

§

impl GetTypeRegistration for PartialCuTimeRange

§

impl GetTypeRegistration for Tov

§

impl<A> GetTypeRegistration for (A,)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B> GetTypeRegistration for (A, B)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C> GetTypeRegistration for (A, B, C)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D> GetTypeRegistration for (A, B, C, D)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E> GetTypeRegistration for (A, B, C, D, E)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F> GetTypeRegistration for (A, B, C, D, E, F)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G> GetTypeRegistration for (A, B, C, D, E, F, G)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G, H> GetTypeRegistration for (A, B, C, D, E, F, G, H)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G, H, I> GetTypeRegistration for (A, B, C, D, E, F, G, H, I)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G, H, I, J> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G, H, I, J, K> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J, K)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration, K: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L> GetTypeRegistration for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration, K: Reflect + MaybeTyped + TypePath + GetTypeRegistration, L: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<K, V> GetTypeRegistration for BTreeMap<K, V>
where K: FromReflect + MaybeTyped + TypePath + GetTypeRegistration + Eq + Ord, V: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<K, V, S> GetTypeRegistration for HashMap<K, V, S>

§

impl<T> GetTypeRegistration for Cow<'static, [T]>
where T: FromReflect + MaybeTyped + Clone + TypePath + GetTypeRegistration,

§

impl<T> GetTypeRegistration for Bound<T>
where T: Clone + Send + Sync + TypePath, Bound<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for Option<T>
where Option<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

§

impl<T> GetTypeRegistration for BinaryHeap<T>
where T: Clone + TypePath, BinaryHeap<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for BTreeSet<T>
where T: Ord + Eq + Clone + Send + Sync + TypePath, BTreeSet<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for VecDeque<T>
where T: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<T> GetTypeRegistration for Arc<T>
where T: Send + Sync + TypePath + ?Sized, Arc<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for Vec<T>
where T: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<T> GetTypeRegistration for Saturating<T>
where T: Clone + Send + Sync + TypePath, Saturating<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for Wrapping<T>
where T: Clone + Send + Sync + TypePath, Wrapping<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for Range<T>
where T: Clone + Send + Sync + TypePath, Range<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for RangeFrom<T>
where T: Clone + Send + Sync + TypePath, RangeFrom<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for RangeInclusive<T>
where T: Clone + Send + Sync + TypePath, RangeInclusive<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for RangeTo<T>
where T: Clone + Send + Sync + TypePath, RangeTo<T>: Any + Send + Sync,

§

impl<T> GetTypeRegistration for RangeToInclusive<T>
where T: Clone + Send + Sync + TypePath, RangeToInclusive<T>: Any + Send + Sync,

§

impl<T, E> GetTypeRegistration for Result<T, E>
where Result<T, E>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, E: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

§

impl<T, const N: usize> GetTypeRegistration for [T; N]
where T: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

§

impl<V, S> GetTypeRegistration for HashSet<V, S>

Implementors§

Source§

impl<I> GetTypeRegistration for CuSimSinkTask<I>
where CuSimSinkTask<I>: Any + Send + Sync,

Source§

impl<T> GetTypeRegistration for CuSimSrcTask<T>
where CuSimSrcTask<T>: Any + Send + Sync,

Source§

impl<T, O> GetTypeRegistration for CuAsyncTask<T, O>
where CuAsyncTask<T, O>: Any + Send + Sync, T: for<'m> CuTask<Output<'m> = CuMsg<O>> + Send + 'static, O: CuMsgPayload + Send + 'static,

Source§

impl<T, const N: usize> GetTypeRegistration for CuArray<T, N>
where CuArray<T, N>: Any + Send + Sync, T: TypePath + Clone,