Struct type_level_values::const_wrapper::ConstWrapper[][src]

pub struct ConstWrapper<Compiletime, WrapperKind>(_);

ConstWrapper type for compiletime-values.

This Type has 2 flavours:

-PhantomWrapper:Which as like a PhantomData

-AsRuntime:Which acts like the runtime version of the value.

Methods

impl<T> ConstWrapper<T, PhantomKind>
[src]

impl<T, Kind> ConstWrapper<T, Kind>
[src]

NEW: Self = MarkerType::MTVAL

Returns the value of the field:

Returns the runtime value of the field.

Returns the runtime value of the field.

Sets the Field field with the Value value.

Sets the Field field with the Value value.

Changes the compile-time value being wrapped.

Changes the compile-time value being wrapped.

impl<T, Kind> ConstWrapper<T, Kind>
[src]

Maps the Field field using the closure F.

Maps the Field field using the closure F,which takes the entire value.

Maps the entire value using the closure F.

impl<T, Kind> ConstWrapper<T, Kind>
[src]

Maps the Field field using the CallInto F.

CallInto is implemented by PhantomWrapper,which allows using any unary TypeFn_ in this function.

Maps the Field field using the CallInto F,which takes the entire value.

CallInto is implemented by PhantomWrapper,which allows using any unary TypeFn_ in this function.

Maps the entire value using the CallInto F.

CallInto is implemented by PhantomWrapper,which allows using any unary TypeFn_ in this function.

Trait Implementations

impl<'de, T, R> Deserialize<'de> for ConstWrapper<T, RuntimeKind<R>> where
    R: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<T, R> Serialize for ConstWrapper<T, RuntimeKind<R>> where
    T: IntoRuntime<R>,
    R: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<T, Kind> WrapperTrait for ConstWrapper<T, Kind>
[src]

impl<T, K> GetDiscriminant for ConstWrapper<T, K>
[src]

The discriminant for this CosntValue. Read more

The marker type used to have the name of the variant of this CosntValue in error messages. Read more

impl<T, K> MarkerType for ConstWrapper<T, K>
[src]

MTVAL: Self = /// The value of Self.
#[allow(const_err)]
const MTVAL: Self = { unsafe { __Uninit::<Self>{uninit: (),}.value } };

The value of Self.

Important traits for &'a mut R

Constructs a reference to Self, this is possible because all references to zero sized types are valid. Read more

Constructs Self,this is possible because Self implements MarkerType.

impl<Compiletime, WrapperKind> Send for ConstWrapper<Compiletime, WrapperKind>
[src]

impl<Compiletime, WrapperKind> Sync for ConstWrapper<Compiletime, WrapperKind>
[src]

impl<T, Kind> Default for ConstWrapper<T, Kind>
[src]

Returns the "default value" for a type. Read more

impl<T, Kind> Copy for ConstWrapper<T, Kind>
[src]

impl<T, Kind> Clone for ConstWrapper<T, Kind>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T, R> Display for ConstWrapper<T, RuntimeKind<R>> where
    T: IntoRuntime<R>,
    R: Display
[src]

Formats the value using the given formatter. Read more

impl<T> Display for ConstWrapper<T, PhantomKind>
[src]

Formats the value using the given formatter. Read more

impl<T, R> Debug for ConstWrapper<T, RuntimeKind<R>> where
    T: IntoRuntime<R>,
    R: Debug
[src]

Formats the value using the given formatter. Read more

impl<T> Debug for ConstWrapper<T, PhantomKind>
[src]

Formats the value using the given formatter. Read more

impl<T> Hash for ConstWrapper<T, PhantomKind>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T, R> Hash for ConstWrapper<T, RuntimeKind<R>> where
    T: IntoRuntime<R>,
    R: Hash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> From<T> for ConstWrapper<T, PhantomKind>
[src]

Performs the conversion.

impl<T, R> From<T> for ConstWrapper<T, RuntimeKind<R>>
[src]

Performs the conversion.

impl<T, R> From<ConstWrapper<T, RuntimeKind<R>>> for ConstWrapper<T, PhantomKind>
[src]

Performs the conversion.

impl<T, R> From<ConstWrapper<T, PhantomKind>> for ConstWrapper<T, RuntimeKind<R>>
[src]

Performs the conversion.

impl<T, K> Into<VariantPhantom<T>> for ConstWrapper<T, K>
[src]

Performs the conversion.

impl<T, K> InitializationValues for ConstWrapper<T, K> where
    T: InitializationValues
[src]

Each field of this must be IsInitField< a type containing the field name >.

Each field of this must be UninitField< a type containing the field name >.

impl<T, Kind> ConstTypeOf_ for ConstWrapper<T, Kind>
[src]

impl<T, Kind> IntoConstType_ for ConstWrapper<T, Kind>
[src]

impl<T, Kind, Field> GetField_<Field> for ConstWrapper<T, Kind> where
    T: GetField_<Field>, 
[src]

The type of the field.

Returns the ConstValue field.

Returns the ConstValue field by reference.

Returns the ConstValue field.

Returns the ConstValue field by reference.

impl<T, Kind, Field, Value> SetField_<Field, Value> for ConstWrapper<T, Kind> where
    T: SetField_<Field, Value>, 
[src]

impl<T, Kind, Params> TypeFn_<Params> for ConstWrapper<T, Kind> where
    T: TypeFn_<Params>, 
[src]

The return value of the function

impl<T, Kind> Deref for ConstWrapper<T, Kind> where
    T: MarkerType
[src]

The resulting type after dereferencing.

Important traits for &'a mut R

Dereferences the value.

impl<T, K> GetConstParam_ for ConstWrapper<T, K>
[src]

impl<T, K> GetConstConstructor_ for ConstWrapper<T, K>
[src]

the ConstConstructor for this type.