[−][src]Trait core_extensions::MarkerType
Represents a zero-sized marker type .
Types implementing this trait are zero-sized and can safely be stored in any
#[repr(C)]
type without changing their layout.
Features
Enabling the "const_generics" feature allows arrays of all lengths to implement this trait, otherwise it's only implemented for arrays up to 32 elements long.
Safety
Implementors of this trait must ensure:
-that the type is zero-sized,
-that it has an alignment of 1.
-that the type is trivially constructible,eg:by implementing ::std::default::Default.
The easiest way to enforce the requirements of being zero-sized and having an alignment of 1 is to have structs composed entirely of MarkerType fields (ie:VariantPhantom , PhantomData , () ).
Associated Constants
Loading content...Provided methods
pub fn markertype_ref<'a>() -> &'a Self where
Self: 'a,
[src]
Self: 'a,
Constructs a reference to Self, this is possible because all references to zero sized types are valid.
pub fn markertype_val() -> Self
[src]
Constructs Self,this is possible because Self implements MarkerType.
Implementations on Foreign Types
impl<T: ?Sized> MarkerType for PhantomData<T>
[src]
impl<T> MarkerType for ManuallyDrop<T> where
T: MarkerType,
[src]
T: MarkerType,
impl MarkerType for ()
[src]
impl<T, const N: usize> MarkerType for [T; N] where
T: MarkerType,
[src]
T: MarkerType,
const_params
only.When the "const_params" feature is disabled, the MarkerType trait is implemented for arrays up to 32 elements long.
impl<A> MarkerType for (A,) where
A: MarkerType,
[src]
A: MarkerType,
impl<A, B> MarkerType for (A, B) where
A: MarkerType,
B: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
impl<A, B, C> MarkerType for (A, B, C) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
impl<A, B, C, D> MarkerType for (A, B, C, D) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
impl<A, B, C, D, E> MarkerType for (A, B, C, D, E) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
impl<A, B, C, D, E, F> MarkerType for (A, B, C, D, E, F) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
impl<A, B, C, D, E, F, G> MarkerType for (A, B, C, D, E, F, G) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
impl<A, B, C, D, E, F, G, H> MarkerType for (A, B, C, D, E, F, G, H) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
impl<A, B, C, D, E, F, G, H, I> MarkerType for (A, B, C, D, E, F, G, H, I) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J> MarkerType for (A, B, C, D, E, F, G, H, I, J) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K> MarkerType for (A, B, C, D, E, F, G, H, I, J, K) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K, L> MarkerType for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K, L, M> MarkerType for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> MarkerType for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> MarkerType for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
O: MarkerType,
[src]
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
O: MarkerType,
impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> MarkerType for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
O: MarkerType,
P: MarkerType,
[src]
Loading content...A: MarkerType,
B: MarkerType,
C: MarkerType,
D: MarkerType,
E: MarkerType,
F: MarkerType,
G: MarkerType,
H: MarkerType,
I: MarkerType,
J: MarkerType,
K: MarkerType,
L: MarkerType,
M: MarkerType,
N: MarkerType,
O: MarkerType,
P: MarkerType,