pub struct DefaultPermissionRequestHandler<P>where
P: HumanLoopProvider,{ /* private fields */ }Available on crate feature
human-loop only.Expand description
默认权限请求处理器(使用 HumanLoopProvider)
Implementations§
Source§impl<P> DefaultPermissionRequestHandler<P>where
P: HumanLoopProvider,
impl<P> DefaultPermissionRequestHandler<P>where
P: HumanLoopProvider,
pub fn new(provider: Arc<P>) -> DefaultPermissionRequestHandler<P>
Trait Implementations§
Source§impl<P> PermissionRequestHandler for DefaultPermissionRequestHandler<P>where
P: HumanLoopProvider + 'static,
impl<P> PermissionRequestHandler for DefaultPermissionRequestHandler<P>where
P: HumanLoopProvider + 'static,
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
request: PermissionRequest,
) -> Pin<Box<dyn Future<Output = Result<PermissionResponse, ReactError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DefaultPermissionRequestHandler<P>: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
request: PermissionRequest,
) -> Pin<Box<dyn Future<Output = Result<PermissionResponse, ReactError>> + Send + 'async_trait>>where
'life0: 'async_trait,
DefaultPermissionRequestHandler<P>: 'async_trait,
处理权限请求 Read more
Source§fn handle_batch<'life0, 'async_trait>(
&'life0 self,
requests: Vec<PermissionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PermissionResponse>, ReactError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn handle_batch<'life0, 'async_trait>(
&'life0 self,
requests: Vec<PermissionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PermissionResponse>, ReactError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
批量处理权限请求(默认实现:逐个处理)
Source§fn is_null_handler(&self) -> bool
fn is_null_handler(&self) -> bool
是否为空占位处理器(Null Handler)。 Read more
Auto Trait Implementations§
impl<P> Freeze for DefaultPermissionRequestHandler<P>
impl<P> RefUnwindSafe for DefaultPermissionRequestHandler<P>where
P: RefUnwindSafe,
impl<P> Send for DefaultPermissionRequestHandler<P>
impl<P> Sync for DefaultPermissionRequestHandler<P>
impl<P> Unpin for DefaultPermissionRequestHandler<P>
impl<P> UnsafeUnpin for DefaultPermissionRequestHandler<P>
impl<P> UnwindSafe for DefaultPermissionRequestHandler<P>where
P: RefUnwindSafe,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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