Struct konst::polymorphism::IsAConstCmpMarker[][src]

pub struct IsAConstCmpMarker<K, T: ?Sized, R: ?Sized>(_);
This is supported on crate feature cmp only.
Expand description

Hack used to automatically wrap standard library types inside CmpWrapper, while leaving user defined types unwrapped.

This can be constructed with he NEW associated constant

Type parameters

K is <R as ConstCmpMarker>::Kind The kind of type that T is, a slice, other std types, non-std types.

T is <R as ConstCmpMarker>::This, the R type after removing all layers of references.

R: Is the type that implements ConstCmpMarker

Implementations

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Copies the value from reference, and wraps it in a CmpWrapper

Constructs an IsAConstCmpMarker

Infers the type parameters by taking a reference to R .

The K and T type parameters are determined by R in the NEW associated constant.

Removes layers of references by coercing the argument.

Coerces an array to a slice, then wraps the slice in a CmpWrapper

An identity function, just takes reference and returns it.

Wraps reference in a CmpWrapper.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.