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".

Implementations on Foreign Types§

Source§

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

Source§

fn new(ty: Ty<'tcx>, valtree: ValTree<'tcx>) -> Value<'tcx>

Source§

fn ty(self) -> Ty<'tcx>

Source§

fn valtree(self) -> ValTree<'tcx>

Source§

fn try_to_target_usize(self, tcx: TyCtxt<'tcx>) -> Option<u64>

Implementors§