pub struct Spec { /* private fields */ }
Implementations§
Source§impl Spec
impl Spec
pub fn new<T>( method_type: Type, method_name: T, method: Method, args: mrb_aspec, ) -> Result<Self, ConstantNameError>
pub const fn method_type(&self) -> &Type
pub fn method(&self) -> Method
pub fn name(&self) -> Cow<'static, str>
pub fn name_c_str(&self) -> &CStr
Sourcepub unsafe fn define(
&self,
interp: &mut Artichoke,
into: &mut RClass,
) -> Result<(), NotDefinedError>
pub unsafe fn define( &self, interp: &mut Artichoke, into: &mut RClass, ) -> Result<(), NotDefinedError>
Define this method on the class-like pointed to by into
.
§Safety
This method requires that into
is non-null and points to a valid
sys::RClass
.
This method requires that the sys::mrb_state
has a valid top_self
object.
Trait Implementations§
impl Eq for Spec
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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