pub struct TriggerRegistry { /* private fields */ }Expand description
이벤트 훅 레지스트리 (이벤트 매칭용)
Implementations§
Source§impl TriggerRegistry
impl TriggerRegistry
pub fn new() -> Self
pub fn register(&self, hook: Arc<EventHook>) -> DbxResult<()>
pub fn unregister(&self, name: &str) -> DbxResult<()>
Sourcepub fn fire(
&self,
ctx: &ExecutionContext,
event: &EventHookEvent,
) -> DbxResult<Vec<String>>
pub fn fire( &self, ctx: &ExecutionContext, event: &EventHookEvent, ) -> DbxResult<Vec<String>>
이벤트에 매칭되는 트리거를 찾아서 조건 평가 후 실행
pub fn list(&self) -> DbxResult<Vec<String>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TriggerRegistry
impl RefUnwindSafe for TriggerRegistry
impl Send for TriggerRegistry
impl Sync for TriggerRegistry
impl Unpin for TriggerRegistry
impl UnsafeUnpin for TriggerRegistry
impl UnwindSafe for TriggerRegistry
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
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>
Converts
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>
Converts
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