[−][src]Struct mtots::Class
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]
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>
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]
K: Eq + Hash + ?Sized,
Symbol: Borrow<K>,
pub fn get_static<K>(&self, name: &K) -> Option<&Value> where
K: Eq + Hash + ?Sized,
Symbol: Borrow<K>,
[src]
K: Eq + Hash + ?Sized,
Symbol: Borrow<K>,
pub fn instantiate(
cls: &Rc<Class>,
globals: &mut Globals,
args: Vec<Value>,
kwargs: Option<HashMap<Symbol, Value, RandomState>>
) -> Result<UserObject, ErrorIndicator>
[src]
cls: &Rc<Class>,
globals: &mut Globals,
args: Vec<Value>,
kwargs: Option<HashMap<Symbol, Value, RandomState>>
) -> Result<UserObject, ErrorIndicator>
Trait Implementations
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]
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> 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.
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>,