pub(super) trait EncodeFrom<'tcx, T> {
// Required method
fn encode_from<'a>(encoder: &mut EncodeContext<'a, 'tcx>, value: T) -> Self;
}Expand description
Converts values from TyCtxt stored form into metadata table stored form
Required Methods§
Sourcefn encode_from<'a>(encoder: &mut EncodeContext<'a, 'tcx>, value: T) -> Self
fn encode_from<'a>(encoder: &mut EncodeContext<'a, 'tcx>, value: T) -> Self
When a T is trivial to encode, it has a fixed size, no pointers inside, this can be
just a no-op. For more complex types this usually creates a LazyValue<T> or LazyArray<T>
encoding value with encoder in the process
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".