[][src]Struct mtots::Class

pub struct Class { /* fields omitted */ }

Implementations

impl Class[src]

pub fn new(
    globals: &mut Globals,
    kind: ClassKind,
    full_name: RcStr,
    bases: Vec<Rc<Class>>,
    fields: Option<Vec<Symbol>>,
    map: HashMap<Symbol, Value, RandomState>,
    static_map: HashMap<Symbol, Value, RandomState>
) -> Result<Rc<Class>, ErrorIndicator>
[src]

pub fn kind(&self) -> ClassKind[src]

pub fn is_trait(&self) -> bool[src]

pub fn full_name(&self) -> &RcStr[src]

pub fn short_name(&self) -> &RcStr[src]

pub fn get_from_instance_map<K>(&self, name: &K) -> Option<&Value> where
    K: Eq + Hash + ?Sized,
    Symbol: Borrow<K>, 
[src]

pub fn get_static<K>(&self, name: &K) -> Option<&Value> where
    K: Eq + Hash + ?Sized,
    Symbol: Borrow<K>, 
[src]

pub fn instantiate(
    cls: &Rc<Class>,
    globals: &mut Globals,
    args: Vec<Value>,
    kwargs: Option<HashMap<Symbol, Value, RandomState>>
) -> Result<UserObject, ErrorIndicator>
[src]

Trait Implementations

impl Debug for Class[src]

Auto Trait Implementations

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]

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

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

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

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

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.