Struct lrs::marker::PhantomData

A dummy type for unused type parameters.

Syntax

struct PhantomData<T>
    where T: ?Sized,

Trait implementations

NameDescription
Clone

Objects that can be duplicated.

Copy

Objects that can safely be copied via memcpy.

Eq

Objects that implement the binary == and != operators.

Remarks

Normally, all type parameters have to be used in some way. If a type has type parameters that are not used directly in the type definition, it has to use this object instead:

struct X<T> {
    _dummy: PhantomData<T>,
}