pub struct CodeObject {
pub argcount: u32,
pub kwonlyargcount: u32,
pub nlocals: u32,
pub stacksize: u32,
pub flags: u32,
pub code: Vec<Opcode>,
pub consts: RefCell<TupleObject>,
pub names: Box<RefCell<Object>>,
pub name: Box<RefCell<Object>>,
pub varnames: Box<Object>,
}
Fields§
§argcount: u32
§kwonlyargcount: u32
§nlocals: u32
§stacksize: u32
§flags: u32
§code: Vec<Opcode>
§consts: RefCell<TupleObject>
§names: Box<RefCell<Object>>
§name: Box<RefCell<Object>>
§varnames: Box<Object>
Implementations§
Source§impl CodeObject
impl CodeObject
pub fn name(&self) -> Result<String, Error>
pub fn names_tuple(&self) -> Result<TupleObject, Error>
pub fn varnames_tuple(&self) -> Result<TupleObject, Error>
Trait Implementations§
Source§impl Clone for CodeObject
impl Clone for CodeObject
Source§fn clone(&self) -> CodeObject
fn clone(&self) -> CodeObject
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for CodeObject
impl !RefUnwindSafe for CodeObject
impl Send for CodeObject
impl !Sync for CodeObject
impl Unpin for CodeObject
impl UnwindSafe for CodeObject
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