pub enum TriggerEvent {
BeforeCreate,
AfterCreate,
BeforeUpdate,
AfterUpdate,
BeforeDelete,
AfterDelete,
OnTransition {
from: String,
to: String,
transition: String,
},
OnEnterState(String),
OnExitState(String),
}nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
Expand description
Lifecycle trigger events — identical for every entity.
Generated files use a type alias: pub type OrderTriggerEvent = TriggerEvent;
Variants§
BeforeCreate
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
AfterCreate
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
BeforeUpdate
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
AfterUpdate
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
BeforeDelete
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
AfterDelete
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
OnTransition
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
Fields
from: Stringnothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
OnEnterState(String)
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
OnExitState(String)
nothing calls it; hook triggers run through backbone_core::write_hooks (the generated <Model>WriteHooks and <Model>Triggers)
Implementations§
Source§impl TriggerEvent
impl TriggerEvent
pub fn is_before_event(&self) -> bool
Trait Implementations§
Source§impl Clone for TriggerEvent
impl Clone for TriggerEvent
Source§impl Debug for TriggerEvent
impl Debug for TriggerEvent
impl Eq for TriggerEvent
Source§impl PartialEq for TriggerEvent
impl PartialEq for TriggerEvent
impl StructuralPartialEq for TriggerEvent
Auto Trait Implementations§
impl Freeze for TriggerEvent
impl RefUnwindSafe for TriggerEvent
impl Send for TriggerEvent
impl Sync for TriggerEvent
impl Unpin for TriggerEvent
impl UnsafeUnpin for TriggerEvent
impl UnwindSafe for TriggerEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more