pub struct Class { /* private fields */ }
Implementations§
Source§impl Class
impl Class
pub fn new( name: RcStr, map: HashMap<RcStr, Value>, static_map: HashMap<RcStr, Value>, ) -> Rc<Class>
pub fn new_with_behavior( name: RcStr, map: HashMap<RcStr, Value>, static_map: HashMap<RcStr, Value>, behavior: Option<Behavior>, ) -> Rc<Class>
pub fn name(&self) -> &RcStr
pub fn map(&self) -> &HashMap<RcStr, Value>
pub fn static_map(&self) -> &HashMap<RcStr, Value>
pub fn get_call(&self) -> Option<Value>
pub fn behavior(&self) -> &Behavior
Sourcepub fn map_from_funcs(funcs: Vec<NativeFunction>) -> HashMap<RcStr, Value>
pub fn map_from_funcs(funcs: Vec<NativeFunction>) -> HashMap<RcStr, Value>
Convenience method for creating a map or static_map from some native functions
pub fn join_class_maps<C>( map: HashMap<RcStr, Value>, classes: Vec<C>, ) -> HashMap<RcStr, Value>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Class
impl !RefUnwindSafe for Class
impl !Send for Class
impl !Sync for Class
impl Unpin for Class
impl !UnwindSafe for Class
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.