RuntimePlugin

Trait RuntimePlugin 

Source
pub trait RuntimePlugin:
    Debug
    + Send
    + Sync {
    // Provided methods
    fn order(&self) -> Order { ... }
    fn config(&self) -> Option<FrozenLayer> { ... }
    fn runtime_components(
        &self,
        current_components: &RuntimeComponentsBuilder,
    ) -> Cow<'_, RuntimeComponentsBuilder> { ... }
}
Expand description

Runtime plugin trait

A RuntimePlugin is the unit of configuration for augmenting the client with new behavior.

Runtime plugins can register interceptors, set runtime components, and modify configuration.

Provided Methods§

Source

fn order(&self) -> Order

Runtime plugin ordering.

There are two runtime plugin “levels” that run in the following order:

  1. Service runtime plugins - runtime plugins that pertain to the entire service.
  2. Operation runtime plugins - runtime plugins relevant only to a single operation.

This function is used to determine runtime plugin order within those levels. So regardless of this Order value, service runtime plugins will still always execute before operation runtime plugins. However, Defaults service runtime plugins will run before Overrides service runtime plugins.

Source

fn config(&self) -> Option<FrozenLayer>

Optionally returns additional config that should be added to the ConfigBag.

As a best practice, a frozen layer should be stored on the runtime plugin instance as a member, and then cloned upon return since that clone is cheap. Constructing a new Layer and freezing it will require a lot of allocations.

Source

fn runtime_components( &self, current_components: &RuntimeComponentsBuilder, ) -> Cow<'_, RuntimeComponentsBuilder>

Returns a RuntimeComponentsBuilder to incorporate into the final runtime components.

The order of runtime plugins determines which runtime components “win”. Components set by later runtime plugins will override those set by earlier runtime plugins.

If no runtime component changes are desired, just return an empty builder.

This method returns a Cow for flexibility. Some implementers may want to store the components builder as a member and return a reference to it, while others may need to create the builder every call. If possible, returning a reference is preferred for performance.

Components configured by previous runtime plugins are in the current_components argument, and can be used to create nested/wrapped components, such as a connector calling into an inner (customer provided) connector.

Implementations on Foreign Types§

Source§

impl RuntimePlugin for PayloadSigningOverrideRuntimePlugin

Source§

impl RuntimePlugin for NoAuthRuntimePlugin

Source§

impl RuntimePlugin for EnforceContentLengthRuntimePlugin

Source§

impl RuntimePlugin for MetricsRuntimePlugin

Source§

impl RuntimePlugin for CannedResponseDeserializer

Source§

impl RuntimePlugin for CannedRequestSerializer

Implementors§

Source§

impl RuntimePlugin for BatchCreateCustomVocabularyItem

Source§

impl RuntimePlugin for BatchDeleteCustomVocabularyItem

Source§

impl RuntimePlugin for BatchUpdateCustomVocabularyItem

Source§

impl RuntimePlugin for BuildBotLocale

Source§

impl RuntimePlugin for CreateBot

Source§

impl RuntimePlugin for CreateBotAlias

Source§

impl RuntimePlugin for CreateBotLocale

Source§

impl RuntimePlugin for CreateBotReplica

Source§

impl RuntimePlugin for CreateBotVersion

Source§

impl RuntimePlugin for CreateExport

Source§

impl RuntimePlugin for CreateIntent

Source§

impl RuntimePlugin for CreateResourcePolicy

Source§

impl RuntimePlugin for CreateResourcePolicyStatement

Source§

impl RuntimePlugin for CreateSlot

Source§

impl RuntimePlugin for CreateSlotType

Source§

impl RuntimePlugin for CreateTestSetDiscrepancyReport

Source§

impl RuntimePlugin for CreateUploadUrl

Source§

impl RuntimePlugin for DeleteBot

Source§

impl RuntimePlugin for DeleteBotAlias

Source§

impl RuntimePlugin for DeleteBotLocale

Source§

impl RuntimePlugin for DeleteBotReplica

Source§

impl RuntimePlugin for DeleteBotVersion

Source§

impl RuntimePlugin for DeleteCustomVocabulary

Source§

impl RuntimePlugin for DeleteExport

Source§

impl RuntimePlugin for DeleteImport

Source§

impl RuntimePlugin for DeleteIntent

Source§

impl RuntimePlugin for DeleteResourcePolicy

Source§

impl RuntimePlugin for DeleteResourcePolicyStatement

Source§

impl RuntimePlugin for DeleteSlot

Source§

impl RuntimePlugin for DeleteSlotType

Source§

impl RuntimePlugin for DeleteTestSet

Source§

impl RuntimePlugin for DeleteUtterances

Source§

impl RuntimePlugin for DescribeBot

Source§

impl RuntimePlugin for DescribeBotAlias

Source§

impl RuntimePlugin for DescribeBotLocale

Source§

impl RuntimePlugin for DescribeBotRecommendation

Source§

impl RuntimePlugin for DescribeBotReplica

Source§

impl RuntimePlugin for DescribeBotResourceGeneration

Source§

impl RuntimePlugin for DescribeBotVersion

Source§

impl RuntimePlugin for DescribeCustomVocabularyMetadata

Source§

impl RuntimePlugin for DescribeExport

Source§

impl RuntimePlugin for DescribeImport

Source§

impl RuntimePlugin for DescribeIntent

Source§

impl RuntimePlugin for DescribeResourcePolicy

Source§

impl RuntimePlugin for DescribeSlot

Source§

impl RuntimePlugin for DescribeSlotType

Source§

impl RuntimePlugin for DescribeTestExecution

Source§

impl RuntimePlugin for DescribeTestSet

Source§

impl RuntimePlugin for DescribeTestSetDiscrepancyReport

Source§

impl RuntimePlugin for DescribeTestSetGeneration

Source§

impl RuntimePlugin for GenerateBotElement

Source§

impl RuntimePlugin for GetTestExecutionArtifactsUrl

Source§

impl RuntimePlugin for ListAggregatedUtterances

Source§

impl RuntimePlugin for ListBotAliasReplicas

Source§

impl RuntimePlugin for ListBotAliases

Source§

impl RuntimePlugin for ListBotLocales

Source§

impl RuntimePlugin for ListBotRecommendations

Source§

impl RuntimePlugin for ListBotReplicas

Source§

impl RuntimePlugin for ListBotResourceGenerations

Source§

impl RuntimePlugin for ListBotVersionReplicas

Source§

impl RuntimePlugin for ListBotVersions

Source§

impl RuntimePlugin for ListBots

Source§

impl RuntimePlugin for ListBuiltInIntents

Source§

impl RuntimePlugin for ListBuiltInSlotTypes

Source§

impl RuntimePlugin for ListCustomVocabularyItems

Source§

impl RuntimePlugin for ListExports

Source§

impl RuntimePlugin for ListImports

Source§

impl RuntimePlugin for ListIntentMetrics

Source§

impl RuntimePlugin for ListIntentPaths

Source§

impl RuntimePlugin for ListIntentStageMetrics

Source§

impl RuntimePlugin for ListIntents

Source§

impl RuntimePlugin for ListRecommendedIntents

Source§

impl RuntimePlugin for ListSessionAnalyticsData

Source§

impl RuntimePlugin for ListSessionMetrics

Source§

impl RuntimePlugin for ListSlotTypes

Source§

impl RuntimePlugin for ListSlots

Source§

impl RuntimePlugin for ListTagsForResource

Source§

impl RuntimePlugin for ListTestExecutionResultItems

Source§

impl RuntimePlugin for ListTestExecutions

Source§

impl RuntimePlugin for ListTestSetRecords

Source§

impl RuntimePlugin for ListTestSets

Source§

impl RuntimePlugin for ListUtteranceAnalyticsData

Source§

impl RuntimePlugin for ListUtteranceMetrics

Source§

impl RuntimePlugin for SearchAssociatedTranscripts

Source§

impl RuntimePlugin for StartBotRecommendation

Source§

impl RuntimePlugin for StartBotResourceGeneration

Source§

impl RuntimePlugin for StartImport

Source§

impl RuntimePlugin for StartTestExecution

Source§

impl RuntimePlugin for StartTestSetGeneration

Source§

impl RuntimePlugin for StopBotRecommendation

Source§

impl RuntimePlugin for TagResource

Source§

impl RuntimePlugin for UntagResource

Source§

impl RuntimePlugin for UpdateBot

Source§

impl RuntimePlugin for UpdateBotAlias

Source§

impl RuntimePlugin for UpdateBotLocale

Source§

impl RuntimePlugin for UpdateBotRecommendation

Source§

impl RuntimePlugin for UpdateExport

Source§

impl RuntimePlugin for UpdateIntent

Source§

impl RuntimePlugin for UpdateResourcePolicy

Source§

impl RuntimePlugin for UpdateSlot

Source§

impl RuntimePlugin for UpdateSlotType

Source§

impl RuntimePlugin for UpdateTestSet

Source§

impl RuntimePlugin for StaticRuntimePlugin

Source§

impl RuntimePlugin for SharedRuntimePlugin