pub trait ConstantBag: Sized + Copy {
type Constant: Constant;
// Required methods
fn make_constant<C: Constant>(
&self,
constant: BorrowedConstant<'_, C>
) -> Self::Constant;
fn make_int(&self, value: BigInt) -> Self::Constant;
fn make_tuple(
&self,
elements: impl Iterator<Item = Self::Constant>
) -> Self::Constant;
fn make_code(&self, code: CodeObject<Self::Constant>) -> Self::Constant;
fn make_name(&self, name: &str) -> <Self::Constant as Constant>::Name;
}
Expand description
A Constant Bag
Required Associated Types§
Required Methods§
fn make_constant<C: Constant>( &self, constant: BorrowedConstant<'_, C> ) -> Self::Constant
fn make_int(&self, value: BigInt) -> Self::Constant
fn make_tuple( &self, elements: impl Iterator<Item = Self::Constant> ) -> Self::Constant
fn make_code(&self, code: CodeObject<Self::Constant>) -> Self::Constant
fn make_name(&self, name: &str) -> <Self::Constant as Constant>::Name
Object Safety§
This trait is not object safe.