Skip to main content

ValueConst

Trait ValueConst 

Source
pub trait ValueConst<I>:
    Copy
    + Debug
    + Hash
    + Eq
where I: Interner<ValueConst = Self>,
{ // Required methods fn new(ty: <I as Interner>::Ty, valtree: <I as Interner>::ValTree) -> Self; fn ty(self) -> <I as Interner>::Ty; fn valtree(self) -> <I as Interner>::ValTree; fn try_to_target_usize(self, interner: I) -> Option<u64>; }

Required Methods§

Source

fn new(ty: <I as Interner>::Ty, valtree: <I as Interner>::ValTree) -> Self

Source

fn ty(self) -> <I as Interner>::Ty

Source

fn valtree(self) -> <I as Interner>::ValTree

Source

fn try_to_target_usize(self, interner: I) -> Option<u64>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<'tcx> ValueConst<TyCtxt<'tcx>> for Value<'tcx>