pub trait ConstantBag: Sized + Copy {
type Constant: Constant;
// Required methods
fn make_constant<C>(
&self,
constant: BorrowedConstant<'_, C>,
) -> Self::Constant
where C: 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>(&self, constant: BorrowedConstant<'_, C>) -> Self::Constantwhere
C: 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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.