Type Definition type_level_values::const_wrapper::PhantomWrapper [−][src]
type PhantomWrapper<Compiletime> = ConstWrapper<Compiletime, PhantomKind>;
A ConstWrapper alias,used for compile-time values, which implements many traits.
Some impls for this are on ConstWrapper<Compiletime,PhantomKind>.
Construction
When constructing a PhantomWrapper inside a function that returns it prefer using PhantomWrapper::NEW.
When constructing a PhantomWrapper whose type can't be inferred use Type::PW or
When there is a value that needs to be converted to a PhantomWrapper either use value.to_pw() or value.into() (if the type is Copy and the target type is PhantomWrapper<_>),
Methods
impl<T> PhantomWrapper<T>
[src]
impl<T> PhantomWrapper<T>
pub fn get_runt<Runtime>(self) -> Runtime where
T: IntoRuntime<Runtime>,
[src]
pub fn get_runt<Runtime>(self) -> Runtime where
T: IntoRuntime<Runtime>,
Trait Implementations
impl<'de, T> Deserialize<'de> for PhantomWrapper<T>
[src]
impl<'de, T> Deserialize<'de> for PhantomWrapper<T>
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Serialize for PhantomWrapper<T>
[src]
impl<T> Serialize for PhantomWrapper<T>
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for PhantomWrapper<T>
[src]
impl<T> Eq for PhantomWrapper<T>
impl<T> PartialEq for PhantomWrapper<T>
[src]
impl<T> PartialEq for PhantomWrapper<T>
fn eq(&self, _: &Self) -> bool
[src]
fn eq(&self, _: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T> Ord for PhantomWrapper<T>
[src]
impl<T> Ord for PhantomWrapper<T>
fn cmp(&self, _: &Self) -> Ordering
[src]
fn cmp(&self, _: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T> PartialOrd for PhantomWrapper<T>
[src]
impl<T> PartialOrd for PhantomWrapper<T>
fn partial_cmp(&self, _: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, _: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T, R> IntoRuntime<R> for PhantomWrapper<T> where
T: IntoRuntime<R>,
[src]
impl<T, R> IntoRuntime<R> for PhantomWrapper<T> where
T: IntoRuntime<R>,
fn to_runtime() -> R
[src]
fn to_runtime() -> R
Gets the runtime equivalent of this ConstValue.
fn to_runtime_ty(_: VariantPhantom<To>) -> To
[src]
fn to_runtime_ty(_: VariantPhantom<To>) -> To
Gets the runtime equivalent of this ConstValue.
fn into_runtime(&self) -> To
[src]
fn into_runtime(&self) -> To
Gets the runtime equivalent of this ConstValue.
fn into_runtime_ty(&self, _: VariantPhantom<To>) -> To
[src]
fn into_runtime_ty(&self, _: VariantPhantom<To>) -> To
Gets the runtime equivalent of this ConstValue.
impl<T, Runtime, Field> GetFieldRuntime_<Field, Runtime> for PhantomWrapper<T> where
T: GetFieldRuntime_<Field, Runtime>,
[src]
impl<T, Runtime, Field> GetFieldRuntime_<Field, Runtime> for PhantomWrapper<T> where
T: GetFieldRuntime_<Field, Runtime>,
type Runtime = T::Runtime
The type of the runtime equivalent of Field
.
fn get_val() -> Self::Runtime where
GetField<Self, Field>: IntoRuntime<Self::Runtime>,
[src]
fn get_val() -> Self::Runtime where
GetField<Self, Field>: IntoRuntime<Self::Runtime>,
Returns the runtime value of the field.
fn runtime_field_ty(
self,
_: Field,
_: VariantPhantom<RuntimeType>
) -> VariantPhantom<Self::Runtime>
[src]
fn runtime_field_ty(
self,
_: Field,
_: VariantPhantom<RuntimeType>
) -> VariantPhantom<Self::Runtime>
Returns a VariantPhantom wrapping the type of the runtime equivalent of Field
.
impl<F, Params> CallRef<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
[src]
impl<F, Params> CallRef<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
impl<F, Params> CallMut<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
[src]
impl<F, Params> CallMut<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
impl<F, Params> CallInto<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
[src]
impl<F, Params> CallInto<Params> for PhantomWrapper<F> where
F: TypeFn_<Params>,
F::Output: ConstValue,
type Returns = F::Output
The return type of this function
fn call_into(self, _: Params) -> F::Output
[src]
fn call_into(self, _: Params) -> F::Output
calls this function
impl<T, Field> Index<Field> for PhantomWrapper<T> where
T: GetField_<Field>,
[src]
impl<T, Field> Index<Field> for PhantomWrapper<T> where
T: GetField_<Field>,