logo

Type Definition ghosts::Ghost

source · []
pub type Ghost<T> = Ghost<PhantomData<T>>;
Expand description

The type of ghost! expressions.

Guaranteed to be a zero-cost ZST token you can pass around in functions and embed in data structures with no runtime impact whatsoever.

Similar to a PhantomData, it can be directly instanced as a unit struct.

use ::ghosts::Ghost;

let _: Ghost<()> = Ghost;

Implementations

Trait Implementations

Returns the “default value” for a type. Read more