encode_with_shorthand in rustc_middle::ty::codec - Rust
Description: Encode the given value or a previously cached shorthand.

Skip to main content

## encode_with_shorthand

# Function encode_with_shorthand

Source

    pub fn encode_with_shorthand<'tcx, E, T, M>(
        encoder: &mut E,
        value: &T,
        cache: M,
    )where
        E: TyEncoder<'tcx>,
        M: for<'b> Fn(&'b mut E) -> &'b mut FxHashMap<T, usize>,
        T: EncodableWithShorthand<'tcx, E>,
        T::Variant: DiscriminantKind<Discriminant = isize>,

Expand description

Encode the given value or a previously cached shorthand.