pub struct Defmethod<'env> { /* private fields */ }Expand description
A method belonging to a Defgeneric.
Implementations§
Source§impl Defmethod<'_>
impl Defmethod<'_>
Sourcepub fn index(&self) -> u16
pub fn index(&self) -> u16
The method’s index within its generic function, which is how CLIPS identifies it for undefinition.
Sourcepub fn is_deletable(&self) -> bool
pub fn is_deletable(&self) -> bool
Whether the method can currently be undefined.
Sourcepub fn pretty_print(&self) -> Option<&str>
pub fn pretty_print(&self) -> Option<&str>
The method’s source text as CLIPS reformats it, or None when no
pretty-print form is stored.
Sourcepub fn set_watched(&mut self, enabled: bool)
pub fn set_watched(&mut self, enabled: bool)
Enables or disables tracing of this method.
Sourcepub fn restrictions(&self) -> Option<MethodRestrictions>
pub fn restrictions(&self) -> Option<MethodRestrictions>
The method’s arity and per-parameter restrictions in structured form.
CLIPS returns this as a flat multifield whose layout is documented in
genrccom.c: minimum arity, maximum arity, restriction count, one index
per restriction, then each restriction as a query flag, a class count,
and that many class names. Returns None if CLIPS reports a layout this
parser does not recognise.
Auto Trait Implementations§
impl<'env> !RefUnwindSafe for Defmethod<'env>
impl<'env> !Send for Defmethod<'env>
impl<'env> !Sync for Defmethod<'env>
impl<'env> !UnwindSafe for Defmethod<'env>
impl<'env> Freeze for Defmethod<'env>
impl<'env> Unpin for Defmethod<'env>
impl<'env> UnsafeUnpin for Defmethod<'env>
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