Skip to main content

MessageHandler

Struct MessageHandler 

Source
pub struct MessageHandler<'class> { /* private fields */ }
Expand description

A message-handler index tied to an immutable borrow of its class.

Implementations§

Source§

impl MessageHandler<'_>

Source

pub fn name(&self) -> &str

The message this handler responds to.

Source

pub fn handler_type(&self) -> HandlerType

Which stage of a send this handler runs in.

§Panics

Panics if CLIPS reports a handler type outside the four documented ones, which would mean this crate’s model of COOL is wrong.

Source

pub fn pretty_print(&self) -> Option<&str>

Returns None for system handlers, which have no source pretty-print form.

Source

pub fn is_deletable(&self) -> bool

Whether the handler can currently be undefined.

Source

pub fn watch(&self) -> bool

Whether CLIPS traces this handler as it runs.

Source

pub fn set_watch(&mut self, enabled: bool)

Enables or disables tracing of this handler.

Auto Trait Implementations§

§

impl<'class> !RefUnwindSafe for MessageHandler<'class>

§

impl<'class> !Send for MessageHandler<'class>

§

impl<'class> !Sync for MessageHandler<'class>

§

impl<'class> !UnwindSafe for MessageHandler<'class>

§

impl<'class> Freeze for MessageHandler<'class>

§

impl<'class> Unpin for MessageHandler<'class>

§

impl<'class> UnsafeUnpin for MessageHandler<'class>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.