pub struct CodeInfo {Show 14 fields
pub flags: CodeFlags,
pub posonlyarg_count: u32,
pub arg_count: u32,
pub kwonlyarg_count: u32,
pub source_path: String,
pub first_line_number: OneIndexed,
pub obj_name: String,
pub blocks: Vec<Block>,
pub current_block: BlockIdx,
pub constants: IndexSet<ConstantData, RandomState>,
pub name_cache: IndexSet<String, RandomState>,
pub varname_cache: IndexSet<String, RandomState>,
pub cellvar_cache: IndexSet<String, RandomState>,
pub freevar_cache: IndexSet<String, RandomState>,
}
Fields§
§flags: CodeFlags
§posonlyarg_count: u32
§arg_count: u32
§kwonlyarg_count: u32
§source_path: String
§first_line_number: OneIndexed
§obj_name: String
§blocks: Vec<Block>
§current_block: BlockIdx
§constants: IndexSet<ConstantData, RandomState>
§name_cache: IndexSet<String, RandomState>
§varname_cache: IndexSet<String, RandomState>
§cellvar_cache: IndexSet<String, RandomState>
§freevar_cache: IndexSet<String, RandomState>
Implementations§
Source§impl CodeInfo
impl CodeInfo
pub fn finalize_code(self, optimize: u8) -> CodeObject
Trait Implementations§
Source§impl InstrDisplayContext for CodeInfo
impl InstrDisplayContext for CodeInfo
type Constant = ConstantData
fn get_constant(&self, i: usize) -> &ConstantData
fn get_name(&self, i: usize) -> &str
fn get_varname(&self, i: usize) -> &str
fn get_cell_name(&self, i: usize) -> &str
Auto Trait Implementations§
impl Freeze for CodeInfo
impl RefUnwindSafe for CodeInfo
impl Send for CodeInfo
impl Sync for CodeInfo
impl Unpin for CodeInfo
impl UnwindSafe for CodeInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more