pub struct SlotChain { /* private fields */ }
Expand description
SlotChain hold all system slots and customized slot. SlotChain support plug-in slots developed by developer.
Implementations§
Source§impl SlotChain
impl SlotChain
pub fn new() -> Self
pub fn exit(&self, ctx_ptr: ContextPtr)
Sourcepub fn add_stat_prepare_slot(&mut self, s: Arc<dyn StatPrepareSlot>)
pub fn add_stat_prepare_slot(&mut self, s: Arc<dyn StatPrepareSlot>)
add_stat_prepare_slot adds the StatPrepareSlot slot to the StatPrepareSlot list of the SlotChain. All StatPrepareSlot in the list will be sorted according to StatPrepareSlot.order() in ascending order. add_stat_prepare_slot is non-thread safe, In concurrency scenario, add_stat_prepare_slot must be guarded by SlotChain.RWMutex#Lock
pub fn add_rule_check_slot(&mut self, s: Arc<dyn RuleCheckSlot>)
pub fn add_stat_slot(&mut self, s: Arc<dyn StatSlot>)
Sourcepub fn entry(&self, ctx_ptr: ContextPtr) -> TokenResult
pub fn entry(&self, ctx_ptr: ContextPtr) -> TokenResult
The entrance of slot chain Return the TokenResult
Auto Trait Implementations§
impl Freeze for SlotChain
impl !RefUnwindSafe for SlotChain
impl Send for SlotChain
impl Sync for SlotChain
impl Unpin for SlotChain
impl !UnwindSafe for SlotChain
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request