pub enum SimplePluginOption<T> {
Value(T),
Function(Arc<dyn Fn(Option<T>) -> T + Send + Sync>),
}Expand description
A simple plugin field that either supplies a value or customizes the existing value.
Builder methods on SimplePluginBuilder automatically convert supported values and
functions into this type.
Experimental: This API may change or be removed.
Variants§
Value(T)
A value that replaces a scalar field or appends to a collection field.
Function(Arc<dyn Fn(Option<T>) -> T + Send + Sync>)
A function that receives the existing field and returns a configured value.
Trait Implementations§
Source§impl<T: Clone> Clone for SimplePluginOption<T>
impl<T: Clone> Clone for SimplePluginOption<T>
Source§fn clone(&self) -> SimplePluginOption<T>
fn clone(&self) -> SimplePluginOption<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<ActivityDefinitions> for SimplePluginOption<ActivityDefinitions>
impl From<ActivityDefinitions> for SimplePluginOption<ActivityDefinitions>
Source§fn from(value: ActivityDefinitions) -> Self
fn from(value: ActivityDefinitions) -> Self
Converts to this type from the input type.
Source§impl From<DataConverter> for SimplePluginOption<DataConverter>
impl From<DataConverter> for SimplePluginOption<DataConverter>
Source§fn from(value: DataConverter) -> Self
fn from(value: DataConverter) -> Self
Converts to this type from the input type.
Source§impl<F> From<F> for SimplePluginOption<DataConverter>
impl<F> From<F> for SimplePluginOption<DataConverter>
Source§impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn ClientInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn ClientInterceptor>>>) -> Vec<Arc<dyn ClientInterceptor>> + Send + Sync + 'static,
impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn ClientInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn ClientInterceptor>>>) -> Vec<Arc<dyn ClientInterceptor>> + Send + Sync + 'static,
Source§impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn WorkerInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn WorkerInterceptor>>>) -> Vec<Arc<dyn WorkerInterceptor>> + Send + Sync + 'static,
impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn WorkerInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn WorkerInterceptor>>>) -> Vec<Arc<dyn WorkerInterceptor>> + Send + Sync + 'static,
Source§impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn ActivityInboundInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn ActivityInboundInterceptor>>>) -> Vec<Arc<dyn ActivityInboundInterceptor>> + Send + Sync + 'static,
impl<F> From<F> for SimplePluginOption<Vec<Arc<dyn ActivityInboundInterceptor>>>where
F: Fn(Option<Vec<Arc<dyn ActivityInboundInterceptor>>>) -> Vec<Arc<dyn ActivityInboundInterceptor>> + Send + Sync + 'static,
Source§impl<F> From<F> for SimplePluginOption<Vec<WorkflowInterceptorConstructor>>where
F: Fn(Option<Vec<WorkflowInterceptorConstructor>>) -> Vec<WorkflowInterceptorConstructor> + Send + Sync + 'static,
impl<F> From<F> for SimplePluginOption<Vec<WorkflowInterceptorConstructor>>where
F: Fn(Option<Vec<WorkflowInterceptorConstructor>>) -> Vec<WorkflowInterceptorConstructor> + Send + Sync + 'static,
Source§impl<F> From<F> for SimplePluginOption<ActivityDefinitions>
impl<F> From<F> for SimplePluginOption<ActivityDefinitions>
Source§impl<F> From<F> for SimplePluginOption<WorkflowDefinitions>
impl<F> From<F> for SimplePluginOption<WorkflowDefinitions>
Source§impl From<Vec<Arc<dyn ActivityInboundInterceptor>>> for SimplePluginOption<Vec<Arc<dyn ActivityInboundInterceptor>>>
impl From<Vec<Arc<dyn ActivityInboundInterceptor>>> for SimplePluginOption<Vec<Arc<dyn ActivityInboundInterceptor>>>
Source§impl From<Vec<Arc<dyn ClientInterceptor>>> for SimplePluginOption<Vec<Arc<dyn ClientInterceptor>>>
impl From<Vec<Arc<dyn ClientInterceptor>>> for SimplePluginOption<Vec<Arc<dyn ClientInterceptor>>>
Source§impl From<Vec<Arc<dyn WorkerInterceptor>>> for SimplePluginOption<Vec<Arc<dyn WorkerInterceptor>>>
impl From<Vec<Arc<dyn WorkerInterceptor>>> for SimplePluginOption<Vec<Arc<dyn WorkerInterceptor>>>
Source§impl From<Vec<WorkflowInterceptorConstructor>> for SimplePluginOption<Vec<WorkflowInterceptorConstructor>>
impl From<Vec<WorkflowInterceptorConstructor>> for SimplePluginOption<Vec<WorkflowInterceptorConstructor>>
Source§fn from(value: Vec<WorkflowInterceptorConstructor>) -> Self
fn from(value: Vec<WorkflowInterceptorConstructor>) -> Self
Converts to this type from the input type.
Source§impl From<WorkflowDefinitions> for SimplePluginOption<WorkflowDefinitions>
impl From<WorkflowDefinitions> for SimplePluginOption<WorkflowDefinitions>
Source§fn from(value: WorkflowDefinitions) -> Self
fn from(value: WorkflowDefinitions) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SimplePluginOption<T>
impl<T> !UnwindSafe for SimplePluginOption<T>
impl<T> Freeze for SimplePluginOption<T>where
T: Freeze,
impl<T> Send for SimplePluginOption<T>where
T: Send,
impl<T> Sync for SimplePluginOption<T>where
T: Sync,
impl<T> Unpin for SimplePluginOption<T>where
T: Unpin,
impl<T> UnsafeUnpin for SimplePluginOption<T>where
T: UnsafeUnpin,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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