[−][src]Struct foolang::objects::Vtable
Fields
name: String
methods: 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]
&self,
selector: &str,
method: fn(_: &Object, _: &[Object], _: &Env) -> Eval
)
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,