[][src]Struct foolang::objects::Vtable

pub struct Vtable {
    pub name: String,
    pub methods: RefCell<HashMap<String, Method>>,
    pub slots: RefCell<HashMap<String, Slot>>,
    pub interfaces: RefCell<HashSet<Rc<Vtable>>>,
}

Fields

name: Stringmethods: RefCell<HashMap<String, Method>>slots: RefCell<HashMap<String, Slot>>interfaces: RefCell<HashSet<Rc<Vtable>>>

Methods

impl Vtable[src]

pub fn new(class: &str) -> Vtable[src]

pub fn add_interface(&self, vt: &Rc<Vtable>)[src]

pub fn add_method(&self, selector: &str, method: Method) -> Result<(), Unwind>[src]

pub fn add_primitive_method_or_panic(
    &self,
    selector: &str,
    method: fn(_: &Object, _: &[Object], _: &Env) -> Eval
)
[src]

pub fn add_slot(&self, name: &str, index: usize, vtable: Option<Rc<Vtable>>)[src]

pub fn slots(&self) -> Ref<HashMap<String, Slot>>[src]

pub fn methods(&self) -> Ref<HashMap<String, Method>>[src]

pub fn interfaces(&self) -> Ref<HashSet<Rc<Vtable>>>[src]

pub fn selectors(&self) -> Vec<String>[src]

pub fn get(&self, name: &str) -> Option<Method>[src]

pub fn has(&self, name: &str) -> bool[src]

Trait Implementations

impl Debug for Vtable[src]

impl Eq for Vtable[src]

impl Hash for Vtable[src]

impl PartialEq<Vtable> for Vtable[src]

Auto Trait Implementations

impl !RefUnwindSafe for Vtable

impl !Send for Vtable

impl !Sync for Vtable

impl Unpin for Vtable

impl !UnwindSafe for Vtable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,