Struct yksom::vm::objects::Class [−][src]
pub struct Class { pub path: PathBuf, pub instrs_off: usize, pub inst_vars_map: HashMap<SmartString, usize>, // some fields omitted }
Fields
path: PathBuf
instrs_off: usize
Offset to this class’s instructions in VM::instrs.
inst_vars_map: HashMap<SmartString, usize>
Implementations
impl Class
[src]
pub fn new(
vm: &VM,
metacls: Val,
name: Val,
path: PathBuf,
instrs_off: usize,
supercls: Val,
inst_vars_map: HashMap<SmartString, usize>,
methods: Val,
methods_map: HashMap<SmartString, usize>
) -> Val
[src]
vm: &VM,
metacls: Val,
name: Val,
path: PathBuf,
instrs_off: usize,
supercls: Val,
inst_vars_map: HashMap<SmartString, usize>,
methods: Val,
methods_map: HashMap<SmartString, usize>
) -> Val
pub fn name(&self, _: &VM) -> Result<Val, Box<VMError>>
[src]
pub fn get_method(&self, vm: &VM, msg: &str) -> Result<Gc<Method>, Box<VMError>>
[src]
pub fn set_metacls(&self, vm: &VM, cls_val: Val)
[src]
pub fn supercls(&self, _: &VM) -> Val
[src]
pub fn set_supercls(&self, _: &VM, cls: Val)
[src]
pub fn set_methods_class(&self, vm: &VM, cls: Val)
[src]
pub fn bootstrap(&self, vm: &VM)
[src]
pub fn fields(&self, vm: &mut VM) -> Val
[src]
pub fn methods(&self, _: &VM) -> Val
[src]
Trait Implementations
impl Debug for Class
[src]
impl NotUnboxable for Class
[src]
impl Obj for Class
[src]
fn dyn_objtype(self: Gc<Self>) -> ObjType
[src]
fn get_class(self: Gc<Self>, _: &mut VM) -> Val
[src]
fn num_inst_vars(self: Gc<Self>, _: &VM) -> usize
[src]
unsafe fn unchecked_inst_var_get(self: Gc<Self>, vm: &VM, n: usize) -> Val
[src]
unsafe fn unchecked_inst_var_set(self: Gc<Self>, vm: &VM, n: usize, v: Val)
[src]
fn hashcode(self: Gc<Self>) -> u64
[src]
fn to_array(self: Gc<Self>) -> Result<Gc<dyn Array>, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn to_strval(self: Gc<Self>, _: &mut VM) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn inst_var_at(self: Gc<Self>, vm: &VM, i: usize) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn inst_var_at_put(
self: Gc<Self>,
vm: &VM,
i: usize,
v: Val
) -> Result<(), Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
vm: &VM,
i: usize,
v: Val
) -> Result<(), Box<VMError>> where
Self: Send,
fn length(self: Gc<Self>) -> usize where
Self: Send,
[src]
Self: Send,
fn add(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn and(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn div(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn double_div(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn modulus(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn mul(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn remainder(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn shl(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn shr(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn sqrt(self: Gc<Self>, _: &mut VM) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn sub(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn xor(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn ref_equals(
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
vm: &mut VM,
other: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
fn equals(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn not_equals(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn greater_than(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn greater_than_equals(
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
fn less_than(self: Gc<Self>, _: &mut VM, _: Val) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
Self: Send,
fn less_than_equals(
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
[src]
self: Gc<Self>,
_: &mut VM,
_: Val
) -> Result<Val, Box<VMError>> where
Self: Send,
impl StaticObjType for Class
[src]
fn static_objtype() -> ObjType
[src]
Auto Trait Implementations
impl !NoTrace for Class
impl !RefUnwindSafe for Class
impl Send for Class
impl !Sync for Class
impl Unpin for Class
impl UnwindSafe for Class
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,