Skip to main content

ErasableGeneric

Trait ErasableGeneric 

Source
pub unsafe trait ErasableGeneric {
    type Repr: 'static;
}
Expand description

Private marker trait for erasable generics - types with this trait have the same repr for all generic param values, and can therefore be transmuted on the singular Repr type representation on ABI boundaries.

§Safety

This type must only be implemented on types known to be repr equivalent to their Repr type.

Required Associated Types§

Source

type Repr: 'static

The singular concrete type that all generic variants can be transmuted on

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ErasableGeneric for &str

Source§

type Repr = &'static str

Source§

impl ErasableGeneric for ()

Source§

impl ErasableGeneric for CanvasGradient

Source§

impl ErasableGeneric for CanvasRenderingContext2d

Source§

impl ErasableGeneric for Document

Source§

impl ErasableGeneric for DomMatrix

Source§

impl ErasableGeneric for DomMatrixReadOnly

Source§

impl ErasableGeneric for Element

Source§

impl ErasableGeneric for Event

Source§

impl ErasableGeneric for EventTarget

Source§

impl ErasableGeneric for HtmlCanvasElement

Source§

impl ErasableGeneric for HtmlCollection

Source§

impl ErasableGeneric for HtmlElement

Source§

impl ErasableGeneric for ImageBitmap

Source§

impl ErasableGeneric for ImageData

Source§

impl ErasableGeneric for Location

Source§

impl ErasableGeneric for Navigator

Source§

impl ErasableGeneric for Node

Source§

impl ErasableGeneric for Response

Source§

impl ErasableGeneric for TextMetrics

Source§

impl ErasableGeneric for Window

Source§

impl ErasableGeneric for bool

Source§

impl ErasableGeneric for char

Source§

impl ErasableGeneric for f32

Source§

impl ErasableGeneric for i8

Source§

impl ErasableGeneric for i16

Source§

impl ErasableGeneric for i32

Source§

impl ErasableGeneric for isize

Source§

impl ErasableGeneric for u8

Source§

impl ErasableGeneric for u16

Source§

impl ErasableGeneric for u32

Source§

impl ErasableGeneric for usize

Source§

impl<'a, A, B, C, D, E, F, G, H, R> ErasableGeneric for &'a dyn Fn(A, B, C, D, E, F, G, H) -> R

Source§

impl<'a, A, B, C, D, E, F, G, H, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C, D, E, F, G, H) -> R

Source§

impl<'a, A, B, C, D, E, F, G, R> ErasableGeneric for &'a dyn Fn(A, B, C, D, E, F, G) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr, <E as ErasableGeneric>::Repr, <F as ErasableGeneric>::Repr, <G as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, E, F, G, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C, D, E, F, G) -> R

Source§

impl<'a, A, B, C, D, E, F, R> ErasableGeneric for &'a dyn Fn(A, B, C, D, E, F) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr, <E as ErasableGeneric>::Repr, <F as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, E, F, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C, D, E, F) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr, <E as ErasableGeneric>::Repr, <F as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, E, R> ErasableGeneric for &'a dyn Fn(A, B, C, D, E) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr, <E as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, E, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C, D, E) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr, <E as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, R> ErasableGeneric for &'a dyn Fn(A, B, C, D) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, D, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C, D) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr, <D as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, R> ErasableGeneric for &'a dyn Fn(A, B, C) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, C, R> ErasableGeneric for &'a mut dyn FnMut(A, B, C) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr, <C as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, R> ErasableGeneric for &'a dyn Fn(A, B) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, B, R> ErasableGeneric for &'a mut dyn FnMut(A, B) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr, <B as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, R> ErasableGeneric for &'a dyn Fn(&A) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, R> ErasableGeneric for &'a dyn Fn(A) -> R

Source§

type Repr = &'static dyn Fn(<A as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, R> ErasableGeneric for &'a mut dyn FnMut(&A) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, A, R> ErasableGeneric for &'a mut dyn FnMut(A) -> R

Source§

type Repr = &'static dyn FnMut(<A as ErasableGeneric>::Repr) -> <R as ErasableGeneric>::Repr

Source§

impl<'a, R> ErasableGeneric for &'a dyn Fn() -> R
where R: ErasableGeneric,

Source§

type Repr = &'static dyn Fn() -> <R as ErasableGeneric>::Repr

Source§

impl<'a, R> ErasableGeneric for &'a mut dyn FnMut() -> R
where R: ErasableGeneric,

Source§

type Repr = &'static dyn FnMut() -> <R as ErasableGeneric>::Repr

Source§

impl<T, E> ErasableGeneric for Result<T, E>

Source§

impl<T> ErasableGeneric for &T
where T: ErasableGeneric,

Source§

type Repr = &'static <T as ErasableGeneric>::Repr

Source§

impl<T> ErasableGeneric for &[T]
where T: ErasableGeneric,

Source§

type Repr = &'static [<T as ErasableGeneric>::Repr]

Source§

impl<T> ErasableGeneric for &mut T
where T: ErasableGeneric,

Source§

type Repr = &'static mut <T as ErasableGeneric>::Repr

Source§

impl<T> ErasableGeneric for *const T
where T: ErasableGeneric,

Source§

impl<T> ErasableGeneric for Box<[T]>
where T: ErasableGeneric,

Source§

impl<T> ErasableGeneric for Option<T>
where T: ErasableGeneric,

Source§

impl<T> ErasableGeneric for Vec<T>
where T: ErasableGeneric,

Implementors§

Source§

impl ErasableGeneric for AggregateError

Source§

impl ErasableGeneric for ArrayBuffer

Source§

impl ErasableGeneric for ArrayBufferOptions

Source§

impl ErasableGeneric for BigInt

Source§

impl ErasableGeneric for BigInt64Array

Source§

impl ErasableGeneric for BigUint64Array

Source§

impl ErasableGeneric for Boolean

Source§

impl ErasableGeneric for Collator

Source§

impl ErasableGeneric for CollatorOptions

Source§

impl ErasableGeneric for CompileError

Source§

impl ErasableGeneric for DataView

Source§

impl ErasableGeneric for Date

Source§

impl ErasableGeneric for DateTimeFormat

Source§

impl ErasableGeneric for DateTimeFormatOptions

Source§

impl ErasableGeneric for DateTimeFormatPart

Source§

impl ErasableGeneric for DateTimeRangeFormatPart

Source§

impl ErasableGeneric for DisplayNames

Source§

impl ErasableGeneric for DisplayNamesOptions

Source§

impl ErasableGeneric for Duration

Source§

impl ErasableGeneric for DurationFormat

Source§

impl ErasableGeneric for DurationFormatOptions

Source§

impl ErasableGeneric for DurationFormatPart

Source§

impl ErasableGeneric for Error

Source§

impl ErasableGeneric for ErrorOptions

Source§

impl ErasableGeneric for EvalError

Source§

impl ErasableGeneric for Exception

Source§

impl ErasableGeneric for FinalizationRegistry

Source§

impl ErasableGeneric for Float16Array

Source§

impl ErasableGeneric for Float32Array

Source§

impl ErasableGeneric for Float64Array

Source§

impl ErasableGeneric for Global

Source§

impl ErasableGeneric for Instance

Source§

impl ErasableGeneric for Int8Array

Source§

impl ErasableGeneric for Int16Array

Source§

impl ErasableGeneric for Int32Array

Source§

impl ErasableGeneric for JsError

Source§

impl ErasableGeneric for JsString

Source§

impl ErasableGeneric for JsValue

Source§

impl ErasableGeneric for LinkError

Source§

impl ErasableGeneric for ListFormat

Source§

impl ErasableGeneric for ListFormatOptions

Source§

impl ErasableGeneric for ListFormatPart

Source§

impl ErasableGeneric for Locale

Source§

impl ErasableGeneric for LocaleMatcherOptions

Source§

impl ErasableGeneric for Memory

Source§

impl ErasableGeneric for Module

Source§

impl ErasableGeneric for Null

Source§

impl ErasableGeneric for Number

Source§

impl ErasableGeneric for NumberFormat

Source§

impl ErasableGeneric for NumberFormatOptions

Source§

impl ErasableGeneric for NumberFormatPart

Source§

impl ErasableGeneric for NumberRangeFormatPart

Source§

impl ErasableGeneric for PluralRules

Source§

impl ErasableGeneric for PluralRulesOptions

Source§

impl ErasableGeneric for Proxy

Source§

impl ErasableGeneric for RangeError

Source§

impl ErasableGeneric for ReferenceError

Source§

impl ErasableGeneric for RegExp

Source§

impl ErasableGeneric for RegExpMatchArray

Source§

impl ErasableGeneric for RelativeTimeFormat

Source§

impl ErasableGeneric for RelativeTimeFormatOptions

Source§

impl ErasableGeneric for RelativeTimeFormatPart

Source§

impl ErasableGeneric for ResolvedCollatorOptions

Source§

impl ErasableGeneric for ResolvedDateTimeFormatOptions

Source§

impl ErasableGeneric for ResolvedDisplayNamesOptions

Source§

impl ErasableGeneric for ResolvedDurationFormatOptions

Source§

impl ErasableGeneric for ResolvedListFormatOptions

Source§

impl ErasableGeneric for ResolvedNumberFormatOptions

Source§

impl ErasableGeneric for ResolvedPluralRulesOptions

Source§

impl ErasableGeneric for ResolvedRelativeTimeFormatOptions

Source§

impl ErasableGeneric for ResolvedSegmenterOptions

Source§

impl ErasableGeneric for RuntimeError

Source§

impl ErasableGeneric for SegmentData

Source§

impl ErasableGeneric for Segmenter

Source§

impl ErasableGeneric for SegmenterOptions

Source§

impl ErasableGeneric for Segments

Source§

impl ErasableGeneric for SharedArrayBuffer

Source§

impl ErasableGeneric for Symbol

Source§

impl ErasableGeneric for SyntaxError

Source§

impl ErasableGeneric for Table

Source§

impl ErasableGeneric for Tag

Source§

impl ErasableGeneric for TextInfo

Source§

impl ErasableGeneric for TypeError

Source§

impl ErasableGeneric for Uint8Array

Source§

impl ErasableGeneric for Uint8ClampedArray

Source§

impl ErasableGeneric for Uint16Array

Source§

impl ErasableGeneric for Uint32Array

Source§

impl ErasableGeneric for Undefined

Source§

impl ErasableGeneric for UriError

Source§

impl ErasableGeneric for WeekInfo

Source§

impl<K, V> ErasableGeneric for Map<K, V>

Source§

impl<K, V> ErasableGeneric for WeakMap<K, V>

Source§

impl<T> ErasableGeneric for Array<T>

Source§

impl<T> ErasableGeneric for ArrayTuple<T>
where T: JsTuple,

Source§

impl<T> ErasableGeneric for AsyncGenerator<T>

Source§

impl<T> ErasableGeneric for AsyncIterator<T>

Source§

impl<T> ErasableGeneric for Function<T>
where T: JsFunction,

Source§

impl<T> ErasableGeneric for Generator<T>

Source§

impl<T> ErasableGeneric for Iterator<T>

Source§

impl<T> ErasableGeneric for IteratorNext<T>

Source§

impl<T> ErasableGeneric for JsFuture<T>

Source§

impl<T> ErasableGeneric for JsOption<T>

Source§

impl<T> ErasableGeneric for Object<T>

Source§

impl<T> ErasableGeneric for Promise<T>

Source§

impl<T> ErasableGeneric for PromiseState<T>

Source§

impl<T> ErasableGeneric for PropertyDescriptor<T>

Source§

impl<T> ErasableGeneric for ScopedClosure<'_, T>
where T: WasmClosure + ?Sized,

Source§

type Repr = ScopedClosure<'static, dyn FnMut()>

Source§

impl<T> ErasableGeneric for Set<T>

Source§

impl<T> ErasableGeneric for WeakRef<T>

Source§

impl<T> ErasableGeneric for WeakSet<T>