diff --git a/core/src/concepts/marker.rs b/core/src/concepts/marker.rs index d670e7268..5f6010e8e 100644 --- a/core/src/concepts/marker.rs +++ b/core/src/concepts/marker.rs @@ -7,6 +7,18 @@ use serde_with::{ }; use serde_with::{DeserializeAs, SerializeAs}; +/// Generic marker for type that only occurs in parameter position. +/// +/// Safety: The signature is type checked by the compiler. +pub struct PhantomParamData(std::marker::PhantomData); +unsafe impl Send for PhantomParamData {} + +impl Default for PhantomParamData { + fn default() -> Self { + Self(Default::default()) + } +} + /// This is an implementation for `Write + !AsRef`. #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct AsWritable;