Skip to main content

GuardArgs

Struct GuardArgs 

Source
pub struct GuardArgs<'a, C, E> {
    pub context: &'a C,
    pub event: &'a Ev<E>,
    /* private fields */
}
Expand description

What a guard sees: the context, the event, and the active configuration.

Fields§

§context: &'a C§event: &'a Ev<E>

Implementations§

Source§

impl<C, E> GuardArgs<'_, C, E>

Source

pub fn in_state(&self, id: &str) -> bool

Whether the state with this id (with or without a leading #) is active, like snapshot.matches('#id').

Auto Trait Implementations§

§

impl<'a, C, E> !RefUnwindSafe for GuardArgs<'a, C, E>

§

impl<'a, C, E> !UnwindSafe for GuardArgs<'a, C, E>

§

impl<'a, C, E> Forget for GuardArgs<'a, C, E>

§

impl<'a, C, E> Freeze for GuardArgs<'a, C, E>
where &'a C: Freeze, &'a Ev<E>: Freeze, &'a Machine<C, E>: Freeze, &'a [u32]: Freeze,

§

impl<'a, C, E> Move for GuardArgs<'a, C, E>

§

impl<'a, C, E> Send for GuardArgs<'a, C, E>
where &'a C: Send, &'a Ev<E>: Send, &'a Machine<C, E>: Send, &'a [u32]: Send,

§

impl<'a, C, E> Sync for GuardArgs<'a, C, E>
where E: Sync, C: Sync, String: Sync, RawTable<usize>: Sync, RawVecInner: Sync, Arc<dyn Logic>: Sync, Arc<[u32]>: Sync, BoxRaw<Guard>: Sync, BoxRaw<Template>: Sync, BoxRaw<Value>: Sync, BoxRaw<dyn Fn(&GuardArgs<'_, C, E>) -> Result<bool, String> + Send + Sync>: Sync, Arc<dyn Fn() -> Result<(), String> + Send + Sync>: Sync, BoxRaw<dyn Fn(&C, &Ev<E>) -> Result<u64, String> + Send + Sync>: Sync, Arc<dyn Fn(&ExprArgs<'_, C, E>) -> Value + Send + Sync>: Sync, Arc<dyn Fn(&ContextArgs<'_>) -> Value + Send + Sync>: Sync, Arc<dyn Fn(&Value) -> Result<Arc<dyn Fn() -> Result<(), String> + Send + Sync>, String> + Send + Sync>: Sync, Arc<dyn Fn(&Value) -> Result<Box<dyn Fn(&GuardArgs<'_, C, E>) -> Result<bool, String> + Send + Sync>, String> + Send + Sync>: Sync, RawTable<(String, Arc<dyn Fn(&Value) -> Result<Arc<dyn Fn() -> Result<(), String> + Send + Sync>, String> + Send + Sync>)>: Sync, RawTable<(String, u32)>: Sync, Arc<Vec<(u32, Vec<u32>)>>: Sync, Arc<IndexMap<String, ActorRef, BuildHasherDefault<DefaultHasher>>>: Sync, Arc<Vec<LogicalTimer<E>>>: Sync,

§

impl<'a, C, E> Unpin for GuardArgs<'a, C, E>
where &'a C: Unpin, &'a Ev<E>: Unpin, &'a Machine<C, E>: Unpin, &'a [u32]: Unpin,

§

impl<'a, C, E> UnsafeUnpin for GuardArgs<'a, C, E>
where &'a C: UnsafeUnpin, &'a Ev<E>: UnsafeUnpin, &'a Machine<C, E>: UnsafeUnpin, &'a [u32]: UnsafeUnpin,

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.